Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task path: /opt/tower/var/tower/playbooks/NOC1/noc_roles/migrate/tasks/main.yml:123
- Using module file /opt/tower/lib/python3.8/site-packages/ansible/modules/commands/command.py
- Pipelining is enabled.
- <172.22.2.229> ESTABLISH SSH CONNECTION FOR USER: ansible
- <172.22.2.229> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
- <172.22.2.229> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
- <172.22.2.229> SSH: ANSIBLE_REMOTE_PORT/remote_port/ansible_port set: (-o)(Port=22)
- <172.22.2.229> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/opt/tower/var/tower/data/deploy_keys/id_rsa")
- <172.22.2.229> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
- <172.22.2.229> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="ansible")
- <172.22.2.229> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
- <172.22.2.229> SSH: PlayContext set ssh_common_args: ()
- <172.22.2.229> SSH: PlayContext set ssh_extra_args: ()
- <172.22.2.229> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/root/.ansible/cp/ansible-ssh-%r-%h-%r)
- <172.22.2.229> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/opt/tower/var/tower/data/deploy_keys/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%r-%h-%r 172.22.2.229 '/bin/sh -c '"'"'sudo -H -S -n -u noc /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-oqnhtjpgmtjgwgftabfbnahabxrthncj ; NOC_CONFIG=yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"''
- Escalation succeeded
- <172.22.2.229> (1, b'\n{"changed": true, "end": "2020-11-26 11:42:56.194676", "stdout": "2020-11-26 12:42:30,207 [noc.core.ioloop.util] Setting up asyncio event loop policy\\n2020-11-26 12:42:30,207 [noc.core.ioloop.util] Setting up default event loop\\n2020-11-26 12:42:30,304 [noc.core.dcs.base] Resolve near service liftbridge\\n2020-11-26 12:42:30,310 [noc.core.dcs.base] No active service liftbridge. Waiting\\n2020-11-26 12:42:30,310 [noc.core.dcs.base] Set faulty status to: No active service liftbridge. Waiting\\n2020-11-26 12:42:55,541 [noc.core.dcs.base] Resolved near service liftbridge to [\'172.22.2.229:9292\']\\n2020-11-26 12:42:55,542 [noc.core.dcs.base] Clearing faulty status\\n2020-11-26 12:42:55,559 [stub] Activating stub service\\n2020-11-26 12:42:55,559 [stub] Starting IOLoop\\n2020-11-26 12:42:55,559 [noc.core.dcs.base] Attempting to get slot\\nEnsuring stream message\\nCreating stream message with 1 partitions\\n2020-11-26 12:42:55,905 [noc.core.debug] UNHANDLED EXCEPTION (2020-11-26 12:42:55.578316)\\nPROCESS: ./commands/migrate-liftbridge.py\\nVERSION: 20.4+fix-liftbridge-alter.91.a8a124c8\\nBRANCH: fix-liftbridge-alter CHANGESET: a8a124c8\\nERROR FINGERPRINT: 12f1f69d-a55e-50dc-9ec6-fdac6483c703\\nWORKING DIRECTORY: /opt/noc\\nEXCEPTION: <class \'noc.core.liftbridge.error.LiftbridgeError\'> no known metadata leader\\nSTART OF TRACEBACK\\n------------------------------------------------------------------------\\nFile: core/liftbridge/error.py (Line: 62)\\nFunction: __exit__\\n 55 pass\\n 56 \\n 57 def __exit__(self, exc_type, exc_val, exc_tb):\\n 58 if exc_type and issubclass(exc_type, AioRpcError):\\n 59 code = exc_val.code()\\n 60 details = exc_val.details()\\n 61 xcls = RPC_CODE_TO_ERR.get(code) or LiftbridgeError\\n 62 ==> raise xcls(details)\\n\\nVariables:\\n self = <noc.core.liftbridge.error.rpc_error object at 0x7f1e4e093c40>\\n exc_type = <class \'grpc.aio._call.AioRpcError\'>\\n exc_val = \\n<AioRpcError of RPC that terminated with:\\n\\tstatus = StatusCode.INTERNAL\\n\\tdetails = \\"no known metadata leader\\"\\n\\tdebug_error_string = \\"{\\"created\\":\\"@1606383775.566406594\\",\\"description\\":\\"Error received from peer ipv4:172.22.2.229:9292\\",\\"file\\":\\"src/core/lib/surface/call.cc\\",\\"file_line\\":1061,\\"grpc_message\\":\\"no known metadata leader\\",\\"grpc_status\\":13}\\"\\n>\\n exc_tb = <traceback object at 0x7f1e4e01d180>\\n code = <StatusCode.INTERNAL: (13, \'internal\')>\\n details = \'no known metadata leader\'\\n xcls = <class \'noc.core.liftbridge.error.LiftbridgeError\'>\\n------------------------------------------------------------------------\\nFile: core/liftbridge/base.py (Line: 396)\\nFunction: create_stream\\n 389 group=group,\\n 390 replicationFactor=replication_factor,\\n 391 partitions=partitions,\\n 392 )\\n 393 if enable_compact:\\n 394 req.CompactEnabled.value = True\\n 395 channel = await self.get_channel()\\n 396 ==> await channel.CreateStream(req)\\n 397 \\n 398 async def delete_stream(self, name: str) -> None:\\n 399 with rpc_error():\\n 400 channel = await self.get_channel()\\n 401 await channel.DeleteStream(DeleteStreamRequest(name=name))\\n 402 \\nVariables:\\n self = <noc.core.liftbridge.base.LiftBridgeClient object at 0x7f1e4e093e50>\\n subject = \'message\'\\n name = \'message\'\\n group = None\\n replication_factor = 1\\n partitions = 1\\n enable_compact = False\\n req = subject: \\"message\\"\\nname: \\"message\\"\\nreplicationFactor: 1\\npartitions: 1\\n\\n channel = <noc.core.liftbridge.base.GRPCChannel object at 0x7f1e4e093f10>\\n------------------------------------------------------------------------\\nFile: commands/migrate-liftbridge.py (Line: 96)\\nFunction: wrapper\\n 89 await client.delete_stream(name)\\n 90 \\n 91 run_sync(wrapper)\\n 92 \\n 93 def create_stream(name: str, n_partitions: int, replication_factor: int):\\n 94 async def wrapper():\\n 95 async with LiftBridgeClient() as client:\\n 96 ==> await client.create_stream(\\n 97 subject=name,\\n 98 name=name,\\n 99 partitions=n_partitions,\\n 100 replication_factor=replication_factor,\\n 101 )\\n 102 \\nVariables:\\n client = <noc.core.liftbridge.base.LiftBridgeClient object at 0x7f1e4e093e50>\\n n_partitions = 1\\n name = \'message\'\\n replication_factor = 1\\n------------------------------------------------------------------------\\nFile: core/ioloop/util.py (Line: 92)\\nFunction: wrapper\\n 85 :return: Callable result\\n 86 \\"\\"\\"\\n 87 global _setup_completed\\n 88 \\n 89 async def wrapper():\\n 90 nonlocal result, error\\n 91 try:\\n 92 ==> result = await cb()\\n 93 except Exception:\\n 94 error = sys.exc_info()\\n 95 \\n 96 if not _setup_completed:\\n 97 setup_asyncio()\\n 98 \\nVariables:\\n cb = \\n<function Command.apply_stream_settings.<locals>.create_stream.<locals>.wrapper at 0x7f1e4e096ca0>\\n error = \\n(<class \'noc.core.liftbridge.error.LiftbridgeError\'>,\\n LiftbridgeError(\'no known metadata leader\'),\\n <traceback object at 0x7f1e4e099f40>)\\n result = None\\n------------------------------------------------------------------------\\nFile: core/comp.py (Line: 39)\\nFunction: reraise\\n 32 \\n 33 def reraise(tp, value, tb=None):\\n 34 try:\\n 35 if value is None:\\n 36 value = tp()\\n 37 if value.__traceback__ is not tb:\\n 38 raise value.with_traceback(tb)\\n 39 ==> raise value\\n 40 finally:\\n 41 value = None\\n 42 tb = None\\nVariables:\\n tp = <class \'noc.core.liftbridge.error.LiftbridgeError\'>\\n value = None\\n tb = None\\n------------------------------------------------------------------------\\nFile: core/ioloop/util.py (Line: 105)\\nFunction: run_sync\\n 98 \\n 99 result: Optional[T] = None\\n 100 error: Optional[Tuple[Any, Any, Any]] = None\\n 101 \\n 102 with IOLoopContext() as loop:\\n 103 loop.run_until_complete(wrapper())\\n 104 if error:\\n 105 ==> reraise(*error)\\n 106 return result\\n 107 \\n 108 \\n 109 _setup_completed = False\\n 110 \\n 111 \\nVariables:\\n close_all = True\\n wrapper = <function run_sync.<locals>.wrapper at 0x7f1e4e096b80>\\n loop = <_UnixSelectorEventLoop running=False closed=True debug=False>\\n error = \\n(<class \'noc.core.liftbridge.error.LiftbridgeError\'>,\\n LiftbridgeError(\'no known metadata leader\'),\\n <traceback object at 0x7f1e4e099f40>)\\n result = None\\n cb = \\n<function Command.apply_stream_settings.<locals>.create_stream.<locals>.wrapper at 0x7f1e4e096ca0>\\n------------------------------------------------------------------------\\nFile: commands/migrate-liftbridge.py (Line: 103)\\nFunction: create_stream\\n 96 await client.create_stream(\\n 97 subject=name,\\n 98 name=name,\\n 99 partitions=n_partitions,\\n 100 replication_factor=replication_factor,\\n 101 )\\n 102 \\n 103 ==> run_sync(wrapper)\\n 104 \\n 105 def alter_stream(\\n 106 current_meta: StreamMetadata, new_partitions: int, replication_factor: int\\n 107 ):\\n 108 name = current_meta.name\\n 109 old_partitions = len(current_meta.partitions)\\nVariables:\\n wrapper = \\n<function Command.apply_stream_settings.<locals>.create_stream.<locals>.wrapper at 0x7f1e4e096ca0>\\n n_partitions = 1\\n name = \'message\'\\n replication_factor = 1\\n------------------------------------------------------------------------\\nFile: commands/migrate-liftbridge.py (Line: 232)\\nFunction: apply_stream_settings\\n 225 partitions,\\n 226 )\\n 227 )\\n 228 alter_stream(stream_meta, partitions, rf)\\n 229 return True\\n 230 # Create stream\\n 231 self.print(\\"Creating stream %s with %d partitions\\" % (stream, partitions))\\n 232 ==> create_stream(stream, partitions, rf)\\n 233 return True\\n 234 \\n 235 \\n 236 if __name__ == \\"__main__\\":\\n 237 Command().run()\\nVariables:\\n meta = \\nMetadata(brokers=[Broker(id=\'centos-noc1\', host=\'172.22.2.229\', port=9292)], metadata=[])\\n partitions = 1\\n rf = 1\\n delete_stream = \\n<function Command.apply_stream_settings.<locals>.delete_stream at 0x7f1e4e096af0>\\n create_stream = \\n<function Command.apply_stream_settings.<locals>.create_stream at 0x7f1e4e096a60>\\n alter_stream = \\n<function Command.apply_stream_settings.<locals>.alter_stream at 0x7f1e4e0969d0>\\n stream_meta = None\\n self = <__main__.Command object at 0x7f1e5f68d0a0>\\n stream = \'message\'\\n------------------------------------------------------------------------\\nFile: commands/migrate-liftbridge.py (Line: 50)\\nFunction: handle\\n 43 rf = min(len(meta.brokers), 2)\\n 44 # Apply settings\\n 45 for stream, partitions in self.iter_limits():\\n 46 if not partitions:\\n 47 self.print(\\"Stream \'%s\' without partition. Skipping..\\" % partitions)\\n 48 continue\\n 49 self.print(\\"Ensuring stream %s\\" % stream)\\n 50 ==> changed |= self.apply_stream_settings(meta, stream, partitions, rf)\\n 51 if changed:\\n 52 self.print(\\"CHANGED\\")\\n 53 else:\\n 54 self.print(\\"OK\\")\\n 55 \\n 56 def get_meta(self) -> Metadata:\\nVariables:\\n self = <__main__.Command object at 0x7f1e5f68d0a0>\\n args = ()\\n options = {}\\n changed = False\\n meta = \\nMetadata(brokers=[Broker(id=\'centos-noc1\', host=\'172.22.2.229\', port=9292)], metadata=[])\\n rf = 1\\n stream = \'message\'\\n partitions = 1\\n------------------------------------------------------------------------\\nFile: core/management/base.py (Line: 78)\\nFunction: run_from_argv\\n 71 self.no_progressbar = cmd_options.pop(\\"no_progressbar\\", False)\\n 72 if enable_profiling:\\n 73 # Start profiler\\n 74 import yappi\\n 75 \\n 76 yappi.start()\\n 77 try:\\n 78 ==> return self.handle(*args, **cmd_options) or 0\\n 79 except CommandError as e:\\n 80 self.print(str(e))\\n 81 return 1\\n 82 except KeyboardInterrupt:\\n 83 self.print(\\"Ctrl+C\\")\\n 84 return 3\\nVariables:\\n self = <__main__.Command object at 0x7f1e5f68d0a0>\\n argv = []\\n parser = \\nArgumentParser(prog=\'noc migrate-liftbridge\', usage=None, description=None, formatter_class=<class \'argparse.HelpFormatter\'>, conflict_handler=\'error\', add_help=True)\\n options = Namespace()\\n cmd_options = {}\\n args = ()\\n loglevel = \'info\'\\n enable_profiling = False\\n show_metrics = False\\n error_report = <function error_report at 0x7f1e4e08c160>\\n------------------------------------------------------------------------\\nEND OF TRACEBACK", "cmd": ["./noc", "migrate-liftbridge"], "failed": true, "delta": "0:00:26.565777", "stderr": "", "rc": 2, "invocation": {"module_args": {"creates": null, "executable": null, "_uses_shell": false, "strip_empty_ends": true, "_raw_params": "./noc migrate-liftbridge", "removes": null, "argv": null, "warn": true, "chdir": "/opt/noc", "stdin_add_newline": true, "stdin": null}}, "start": "2020-11-26 11:42:29.628899", "msg": "non-zero return code"}\n', b'OpenSSH_8.1p1, OpenSSL 1.1.1g 21 Apr 2020\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug2: resolve_canonicalize: hostname 172.22.2.229 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1931\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n')
- <172.22.2.229> Failed to connect to the host via ssh: OpenSSH_8.1p1, OpenSSL 1.1.1g 21 Apr 2020
- debug1: Reading configuration data /etc/ssh/ssh_config
- debug2: resolve_canonicalize: hostname 172.22.2.229 is address
- debug1: auto-mux: Trying existing master
- debug2: fd 3 setting O_NONBLOCK
- debug2: mux_client_hello_exchange: master version 4
- debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
- debug3: mux_client_request_session: entering
- debug3: mux_client_request_alive: entering
- debug3: mux_client_request_alive: done pid = 1931
- debug3: mux_client_request_session: session request sent
- debug3: mux_client_read_packet: read header failed: Broken pipe
- debug2: Received exit status from master 1
- fatal: [centos-noc1]: FAILED! => {
- "changed": true,
- "cmd": [
- "./noc",
- "migrate-liftbridge"
- ],
- "delta": "0:00:26.565777",
- "end": "2020-11-26 11:42:56.194676",
- "invocation": {
- "module_args": {
- "_raw_params": "./noc migrate-liftbridge",
- "_uses_shell": false,
- "argv": null,
- "chdir": "/opt/noc",
- "creates": null,
- "executable": null,
- "removes": null,
- "stdin": null,
- "stdin_add_newline": true,
- "strip_empty_ends": true,
- "warn": true
- }
- },
- "rc": 2,
- "start": "2020-11-26 11:42:29.628899"
- }
- STDOUT:
- 2020-11-26 12:42:30,207 [noc.core.ioloop.util] Setting up asyncio event loop policy
- 2020-11-26 12:42:30,207 [noc.core.ioloop.util] Setting up default event loop
- 2020-11-26 12:42:30,304 [noc.core.dcs.base] Resolve near service liftbridge
- 2020-11-26 12:42:30,310 [noc.core.dcs.base] No active service liftbridge. Waiting
- 2020-11-26 12:42:30,310 [noc.core.dcs.base] Set faulty status to: No active service liftbridge. Waiting
- 2020-11-26 12:42:55,541 [noc.core.dcs.base] Resolved near service liftbridge to ['172.22.2.229:9292']
- 2020-11-26 12:42:55,542 [noc.core.dcs.base] Clearing faulty status
- 2020-11-26 12:42:55,559 [stub] Activating stub service
- 2020-11-26 12:42:55,559 [stub] Starting IOLoop
- 2020-11-26 12:42:55,559 [noc.core.dcs.base] Attempting to get slot
- Ensuring stream message
- Creating stream message with 1 partitions
- 2020-11-26 12:42:55,905 [noc.core.debug] UNHANDLED EXCEPTION (2020-11-26 12:42:55.578316)
- PROCESS: ./commands/migrate-liftbridge.py
- VERSION: 20.4+fix-liftbridge-alter.91.a8a124c8
- BRANCH: fix-liftbridge-alter CHANGESET: a8a124c8
- ERROR FINGERPRINT: 12f1f69d-a55e-50dc-9ec6-fdac6483c703
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <class 'noc.core.liftbridge.error.LiftbridgeError'> no known metadata leader
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: core/liftbridge/error.py (Line: 62)
- Function: __exit__
- 55 pass
- 56
- 57 def __exit__(self, exc_type, exc_val, exc_tb):
- 58 if exc_type and issubclass(exc_type, AioRpcError):
- 59 code = exc_val.code()
- 60 details = exc_val.details()
- 61 xcls = RPC_CODE_TO_ERR.get(code) or LiftbridgeError
- 62 ==> raise xcls(details)
- Variables:
- self = <noc.core.liftbridge.error.rpc_error object at 0x7f1e4e093c40>
- exc_type = <class 'grpc.aio._call.AioRpcError'>
- exc_val =
- <AioRpcError of RPC that terminated with:
- status = StatusCode.INTERNAL
- details = "no known metadata leader"
- debug_error_string = "{"created":"@1606383775.566406594","description":"Error received from peer ipv4:172.22.2.229:9292","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"no known metadata leader","grpc_status":13}"
- >
- exc_tb = <traceback object at 0x7f1e4e01d180>
- code = <StatusCode.INTERNAL: (13, 'internal')>
- details = 'no known metadata leader'
- xcls = <class 'noc.core.liftbridge.error.LiftbridgeError'>
- ------------------------------------------------------------------------
- File: core/liftbridge/base.py (Line: 396)
- Function: create_stream
- 389 group=group,
- 390 replicationFactor=replication_factor,
- 391 partitions=partitions,
- 392 )
- 393 if enable_compact:
- 394 req.CompactEnabled.value = True
- 395 channel = await self.get_channel()
- 396 ==> await channel.CreateStream(req)
- 397
- 398 async def delete_stream(self, name: str) -> None:
- 399 with rpc_error():
- 400 channel = await self.get_channel()
- 401 await channel.DeleteStream(DeleteStreamRequest(name=name))
- 402
- Variables:
- self = <noc.core.liftbridge.base.LiftBridgeClient object at 0x7f1e4e093e50>
- subject = 'message'
- name = 'message'
- group = None
- replication_factor = 1
- partitions = 1
- enable_compact = False
- req = subject: "message"
- name: "message"
- replicationFactor: 1
- partitions: 1
- channel = <noc.core.liftbridge.base.GRPCChannel object at 0x7f1e4e093f10>
- ------------------------------------------------------------------------
- File: commands/migrate-liftbridge.py (Line: 96)
- Function: wrapper
- 89 await client.delete_stream(name)
- 90
- 91 run_sync(wrapper)
- 92
- 93 def create_stream(name: str, n_partitions: int, replication_factor: int):
- 94 async def wrapper():
- 95 async with LiftBridgeClient() as client:
- 96 ==> await client.create_stream(
- 97 subject=name,
- 98 name=name,
- 99 partitions=n_partitions,
- 100 replication_factor=replication_factor,
- 101 )
- 102
- Variables:
- client = <noc.core.liftbridge.base.LiftBridgeClient object at 0x7f1e4e093e50>
- n_partitions = 1
- name = 'message'
- replication_factor = 1
- ------------------------------------------------------------------------
- File: core/ioloop/util.py (Line: 92)
- Function: wrapper
- 85 :return: Callable result
- 86 """
- 87 global _setup_completed
- 88
- 89 async def wrapper():
- 90 nonlocal result, error
- 91 try:
- 92 ==> result = await cb()
- 93 except Exception:
- 94 error = sys.exc_info()
- 95
- 96 if not _setup_completed:
- 97 setup_asyncio()
- 98
- Variables:
- cb =
- <function Command.apply_stream_settings.<locals>.create_stream.<locals>.wrapper at 0x7f1e4e096ca0>
- error =
- (<class 'noc.core.liftbridge.error.LiftbridgeError'>,
- LiftbridgeError('no known metadata leader'),
- <traceback object at 0x7f1e4e099f40>)
- result = None
- ------------------------------------------------------------------------
- File: core/comp.py (Line: 39)
- Function: reraise
- 32
- 33 def reraise(tp, value, tb=None):
- 34 try:
- 35 if value is None:
- 36 value = tp()
- 37 if value.__traceback__ is not tb:
- 38 raise value.with_traceback(tb)
- 39 ==> raise value
- 40 finally:
- 41 value = None
- 42 tb = None
- Variables:
- tp = <class 'noc.core.liftbridge.error.LiftbridgeError'>
- value = None
- tb = None
- ------------------------------------------------------------------------
- File: core/ioloop/util.py (Line: 105)
- Function: run_sync
- 98
- 99 result: Optional[T] = None
- 100 error: Optional[Tuple[Any, Any, Any]] = None
- 101
- 102 with IOLoopContext() as loop:
- 103 loop.run_until_complete(wrapper())
- 104 if error:
- 105 ==> reraise(*error)
- 106 return result
- 107
- 108
- 109 _setup_completed = False
- 110
- 111
- Variables:
- close_all = True
- wrapper = <function run_sync.<locals>.wrapper at 0x7f1e4e096b80>
- loop = <_UnixSelectorEventLoop running=False closed=True debug=False>
- error =
- (<class 'noc.core.liftbridge.error.LiftbridgeError'>,
- LiftbridgeError('no known metadata leader'),
- <traceback object at 0x7f1e4e099f40>)
- result = None
- cb =
- <function Command.apply_stream_settings.<locals>.create_stream.<locals>.wrapper at 0x7f1e4e096ca0>
- ------------------------------------------------------------------------
- File: commands/migrate-liftbridge.py (Line: 103)
- Function: create_stream
- 96 await client.create_stream(
- 97 subject=name,
- 98 name=name,
- 99 partitions=n_partitions,
- 100 replication_factor=replication_factor,
- 101 )
- 102
- 103 ==> run_sync(wrapper)
- 104
- 105 def alter_stream(
- 106 current_meta: StreamMetadata, new_partitions: int, replication_factor: int
- 107 ):
- 108 name = current_meta.name
- 109 old_partitions = len(current_meta.partitions)
- Variables:
- wrapper =
- <function Command.apply_stream_settings.<locals>.create_stream.<locals>.wrapper at 0x7f1e4e096ca0>
- n_partitions = 1
- name = 'message'
- replication_factor = 1
- ------------------------------------------------------------------------
- File: commands/migrate-liftbridge.py (Line: 232)
- Function: apply_stream_settings
- 225 partitions,
- 226 )
- 227 )
- 228 alter_stream(stream_meta, partitions, rf)
- 229 return True
- 230 # Create stream
- 231 self.print("Creating stream %s with %d partitions" % (stream, partitions))
- 232 ==> create_stream(stream, partitions, rf)
- 233 return True
- 234
- 235
- 236 if __name__ == "__main__":
- 237 Command().run()
- Variables:
- meta =
- Metadata(brokers=[Broker(id='centos-noc1', host='172.22.2.229', port=9292)], metadata=[])
- partitions = 1
- rf = 1
- delete_stream =
- <function Command.apply_stream_settings.<locals>.delete_stream at 0x7f1e4e096af0>
- create_stream =
- <function Command.apply_stream_settings.<locals>.create_stream at 0x7f1e4e096a60>
- alter_stream =
- <function Command.apply_stream_settings.<locals>.alter_stream at 0x7f1e4e0969d0>
- stream_meta = None
- self = <__main__.Command object at 0x7f1e5f68d0a0>
- stream = 'message'
- ------------------------------------------------------------------------
- File: commands/migrate-liftbridge.py (Line: 50)
- Function: handle
- 43 rf = min(len(meta.brokers), 2)
- 44 # Apply settings
- 45 for stream, partitions in self.iter_limits():
- 46 if not partitions:
- 47 self.print("Stream '%s' without partition. Skipping.." % partitions)
- 48 continue
- 49 self.print("Ensuring stream %s" % stream)
- 50 ==> changed |= self.apply_stream_settings(meta, stream, partitions, rf)
- 51 if changed:
- 52 self.print("CHANGED")
- 53 else:
- 54 self.print("OK")
- 55
- 56 def get_meta(self) -> Metadata:
- Variables:
- self = <__main__.Command object at 0x7f1e5f68d0a0>
- args = ()
- options = {}
- changed = False
- meta =
- Metadata(brokers=[Broker(id='centos-noc1', host='172.22.2.229', port=9292)], metadata=[])
- rf = 1
- stream = 'message'
- partitions = 1
- ------------------------------------------------------------------------
- File: core/management/base.py (Line: 78)
- Function: run_from_argv
- 71 self.no_progressbar = cmd_options.pop("no_progressbar", False)
- 72 if enable_profiling:
- 73 # Start profiler
- 74 import yappi
- 75
- 76 yappi.start()
- 77 try:
- 78 ==> return self.handle(*args, **cmd_options) or 0
- 79 except CommandError as e:
- 80 self.print(str(e))
- 81 return 1
- 82 except KeyboardInterrupt:
- 83 self.print("Ctrl+C")
- 84 return 3
- Variables:
- self = <__main__.Command object at 0x7f1e5f68d0a0>
- argv = []
- parser =
- ArgumentParser(prog='noc migrate-liftbridge', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
- options = Namespace()
- cmd_options = {}
- args = ()
- loglevel = 'info'
- enable_profiling = False
- show_metrics = False
- error_report = <function error_report at 0x7f1e4e08c160>
- ------------------------------------------------------------------------
- END OF TRACEBACK
- MSG:
- non-zero return code
Advertisement
Add Comment
Please, Sign In to add comment