crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

add node eth key for every node type #1991

Closed oberstet closed 2 years ago

oberstet commented 2 years ago
(cpy39_1) (base) oberstet@intel-nuci7:~/scm/typedefint/crossbar-cluster/stack$ make remove_featuretest 
crossbar shell --realm default remove arealm-role featuretest featuretest1

ApplicationError(error=<wamp.error.runtime_error>, args=[], kwargs={}, enc_algo=None, callee=None, callee_authid=None, callee_authrole=None, forward_for=None)
make: [Makefile:193: remove_featuretest] Fehler 1 (ignoriert)
crossbar shell --realm default delete role featuretest1

{
    "oid": "28058be8-f242-455b-bd44-16985e69412f", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Role 1", 
    "tags": null, 
    "name": "featuretest1", 
    "created": 1649711919915112209, 
    "owner": null
}

Finished command in 11.5 ms: crossbar shell --realm default delete role featuretest1
crossbar shell --realm default delete arealm featuretest

application realm with oid 850a57f2-d371-42f5-b412-f060ff497234 found, but currently in status "1" [crossbar.error.not_stopped]
make: [Makefile:195: remove_featuretest] Fehler 1 (ignoriert)
(cpy39_1) (base) oberstet@intel-nuci7:~/scm/typedefint/crossbar-cluster/stack$ 
2022-04-11T23:18:58+0200 [Container   86641] <crossbar.master.arealm.arealm.ApplicationRealmManager.remove_arealm_role>(arealm_oid=850a57f2-d371-42f5-b412-f060ff497234, role_oid=28058be8-f242-455b-bd44-16985e69412f, details=CallDetails(registration=<autobahn.wamp.request.Registration object at 0x7fd2d4d46090>, progress=None, caller=2709473734908274, caller_authid=superuser, caller_authrole=owner, procedure=<crossbarfabriccenter.mrealm.arealm.remove_arealm_role>, transaction_hash=None, enc_algo=None, forward_for=None))
2022-04-11T23:18:58+0200 [Container   86641] MrealmController.onUserError(): "AssertionError: "
Traceback (most recent call last):
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/txaio/tx.py", line 366, in as_future
    return ensureDeferred(fun(*args, **kwargs))
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/twisted/internet/defer.py", line 1129, in ensureDeferred
    return Deferred.fromCoroutine(coro)
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/twisted/internet/defer.py", line 1105, in fromCoroutine
    return _cancellableInlineCallbacks(coro)
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/twisted/internet/defer.py", line 1815, in _cancellableInlineCallbacks
    _inlineCallbacks(None, gen, status)
--- <exception caught here> ---
  File "/home/oberstet/scm/crossbario/autobahn-python/autobahn/wamp/protocol.py", line 520, in _type_check
    return await txaio.as_future(func, *args, **kwargs)
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
    result = current_context.run(gen.send, result)
  File "/home/oberstet/scm/crossbario/crossbar/crossbar/master/arealm/arealm.py", line 2561, in remove_arealm_role
    arealm_role_association = self.schema.arealm_role_associations[txn, (arealm_oid, role_oid_)]
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/zlmdb/_pmap.py", line 285, in __getitem__
    _key = struct.pack('>H', self._slot) + self._serialize_key(key)
  File "/home/oberstet/cpy39_1/lib/python3.9/site-packages/zlmdb/_types.py", line 369, in _serialize_key
    assert isinstance(key1, uuid.UUID)
builtins.AssertionError: 

2022-04-11T23:18:58+0200 [Router      86573] Router detached session from realm "default" (session=2709473734908274, detached_session_ids=1, authid="superuser", authrole="owner", authmethod="cryptosign", authprovider="dynamic") <crossbar.router.router.Router.detach>
oberstet commented 2 years ago

full cycling through create/remove/create for arealms via CLI:

(cpy39_1) (base) oberstet@intel-nuci7:~/scm/typedefint/crossbar-cluster/stack$ make cycle_featuretest
CROSSBAR="crossbar" ./setup-featuretest.sh

{
    "oid": "e4119a32-f2b4-4c85-81e2-a273ab9b7d8b", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Realm", 
    "tags": null, 
    "name": "featuretest", 
    "status": "STOPPED", 
    "workergroup_oid": null, 
    "webcluster_oid": null, 
    "datamarket_oid": null, 
    "changed": 1649746011813417583, 
    "owner_oid": "da0cc2c7-a152-4da8-89d9-0c8219e438bf", 
    "enable_meta_api": true, 
    "bridge_meta_api": true, 
    "peering": {
        "market_oid": "6734c4c5-0e1d-4aa6-9a46-d9ad9cc88668", 
        "host_market_maker": true
    }
}

Finished command in 9.3 ms: crossbar shell --realm default create arealm featuretest --config={
    "description": "Crossbar.io Feature Test - Application Realm",
    "enable_meta_api": true,
    "bridge_meta_api": true,
    "peering": {
        "market_oid": "6734c4c5-0e1d-4aa6-9a46-d9ad9cc88668",
        "host_market_maker": true
    }
}

{
    "oid": "1c44b8f8-2fb9-41d4-8b22-bca6c26395c8", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Role 1", 
    "tags": null, 
    "name": "featuretest1", 
    "created": 1649746015049717331, 
    "owner": null
}

Finished command in 5.9 ms: crossbar shell --realm default create role featuretest1 --config={
    "description": "Crossbar.io Feature Test - Application Role 1"
}

{
    "oid": "b5d34f73-cf20-4d76-af13-cb66a77c0f02", 
    "label": null, 
    "description": null, 
    "tags": null, 
    "role_oid": "1c44b8f8-2fb9-41d4-8b22-bca6c26395c8", 
    "uri": "", 
    "uri_check_level": null, 
    "match": "prefix", 
    "allow_call": true, 
    "allow_register": true, 
    "allow_publish": true, 
    "allow_subscribe": true, 
    "disclose_caller": true, 
    "disclose_publisher": true, 
    "cache": null, 
    "created": null, 
    "owner": null
}

Finished command in 10.8 ms: crossbar shell --realm default add role-permission featuretest1  --config={
    "match": "prefix",
    "allow_call": true,
    "allow_publish": true,
    "allow_register": true,
    "allow_subscribe": true,
    "disclose_caller": true,
    "disclose_publisher": true
}

{
    "arealm_oid": "e4119a32-f2b4-4c85-81e2-a273ab9b7d8b", 
    "role_oid": "1c44b8f8-2fb9-41d4-8b22-bca6c26395c8"
}

Finished command in 12.5 ms: crossbar shell --realm default add arealm-role featuretest featuretest1 --config={
    "description": "Association of application role 'featuretest1' to application realm 'featuretest'"
}
crossbar shell --realm default remove arealm-role featuretest featuretest1

{
    "arealm_oid": "e4119a32-f2b4-4c85-81e2-a273ab9b7d8b", 
    "role_oid": "1c44b8f8-2fb9-41d4-8b22-bca6c26395c8"
}

Finished command in 7.3 ms: crossbar shell --realm default remove arealm-role featuretest featuretest1
crossbar shell --realm default delete role featuretest1

{
    "oid": "1c44b8f8-2fb9-41d4-8b22-bca6c26395c8", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Role 1", 
    "tags": null, 
    "name": "featuretest1", 
    "created": 1649746015049717331, 
    "owner": null
}

Finished command in 10.6 ms: crossbar shell --realm default delete role featuretest1
crossbar shell --realm default delete arealm featuretest

{
    "oid": "e4119a32-f2b4-4c85-81e2-a273ab9b7d8b", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Realm", 
    "tags": null, 
    "name": "featuretest", 
    "status": "STOPPED", 
    "workergroup_oid": null, 
    "webcluster_oid": null, 
    "datamarket_oid": null, 
    "changed": 1649746011813417583, 
    "owner_oid": "da0cc2c7-a152-4da8-89d9-0c8219e438bf", 
    "enable_meta_api": true, 
    "bridge_meta_api": true, 
    "peering": {
        "market_oid": "6734c4c5-0e1d-4aa6-9a46-d9ad9cc88668", 
        "host_market_maker": true
    }
}

Finished command in 10.9 ms: crossbar shell --realm default delete arealm featuretest
CROSSBAR="crossbar" ./setup-featuretest.sh

{
    "oid": "d2e822b3-1e29-481e-9164-94f83833752f", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Realm", 
    "tags": null, 
    "name": "featuretest", 
    "status": "STOPPED", 
    "workergroup_oid": null, 
    "webcluster_oid": null, 
    "datamarket_oid": null, 
    "changed": 1649746034510377836, 
    "owner_oid": "da0cc2c7-a152-4da8-89d9-0c8219e438bf", 
    "enable_meta_api": true, 
    "bridge_meta_api": true, 
    "peering": {
        "market_oid": "6734c4c5-0e1d-4aa6-9a46-d9ad9cc88668", 
        "host_market_maker": true
    }
}

Finished command in 11.4 ms: crossbar shell --realm default create arealm featuretest --config={
    "description": "Crossbar.io Feature Test - Application Realm",
    "enable_meta_api": true,
    "bridge_meta_api": true,
    "peering": {
        "market_oid": "6734c4c5-0e1d-4aa6-9a46-d9ad9cc88668",
        "host_market_maker": true
    }
}

{
    "oid": "4d3e2db1-ea4b-4eba-8e23-e58e86672dec", 
    "label": null, 
    "description": "Crossbar.io Feature Test - Application Role 1", 
    "tags": null, 
    "name": "featuretest1", 
    "created": 1649746037767902213, 
    "owner": null
}

Finished command in 11.0 ms: crossbar shell --realm default create role featuretest1 --config={
    "description": "Crossbar.io Feature Test - Application Role 1"
}

{
    "oid": "697e4330-44c9-4bfe-a968-72ddd330a618", 
    "label": null, 
    "description": null, 
    "tags": null, 
    "role_oid": "4d3e2db1-ea4b-4eba-8e23-e58e86672dec", 
    "uri": "", 
    "uri_check_level": null, 
    "match": "prefix", 
    "allow_call": true, 
    "allow_register": true, 
    "allow_publish": true, 
    "allow_subscribe": true, 
    "disclose_caller": true, 
    "disclose_publisher": true, 
    "cache": null, 
    "created": null, 
    "owner": null
}

Finished command in 11.6 ms: crossbar shell --realm default add role-permission featuretest1  --config={
    "match": "prefix",
    "allow_call": true,
    "allow_publish": true,
    "allow_register": true,
    "allow_subscribe": true,
    "disclose_caller": true,
    "disclose_publisher": true
}

{
    "arealm_oid": "d2e822b3-1e29-481e-9164-94f83833752f", 
    "role_oid": "4d3e2db1-ea4b-4eba-8e23-e58e86672dec"
}

Finished command in 12.3 ms: crossbar shell --realm default add arealm-role featuretest featuretest1 --config={
    "description": "Association of application role 'featuretest1' to application realm 'featuretest'"
}
(cpy39_1) (base) oberstet@intel-nuci7:~/scm/typedefint/crossbar-cluster/stack$ 
oberstet commented 2 years ago
======================================================== short test summary info ========================================================
FAILED test/functests/cbtests/test_cb_apperrors.py::test_guest_startup_error - assert 'A RuntimeError from __init__' in '2022-04-19T19...
FAILED test/functests/cbtests/test_cb_apperrors.py::test_component_class_startup_error - AssertionError: didn't see our exception
================================================ 2 failed, 4 passed in 110.87s (0:01:50) ================================================
oberstet commented 2 years ago

locally, all tests run green .. for some reason, it fails (sometimes) via GH workflows .. not sure why

________________________________________________________________ summary ________________________________________________________________
  sphinx: commands succeeded
  flake8: commands succeeded
  mypy: commands succeeded
  yapf: commands succeeded
  bandit: commands succeeded
  py39-pinned-trial: commands succeeded
  py39-unpinned-trial: commands succeeded
  py39-abtrunk-trial: commands succeeded
  py39-examples: commands succeeded
  pytest: commands succeeded
  functests-cb: commands succeeded
  functests-cfc: commands succeeded
  py39-api-1: commands succeeded
  py39-cli-0: commands succeeded
  py39-cli-1: commands succeeded
  py39-cli-2: commands succeeded
  py39-cli-3: commands succeeded
  congratulations :)
(cpy39_1) (base) oberstet@intel-nuci7:~/scm/crossbario/crossbar$ 
oberstet commented 2 years ago

Bildschirmfoto von 2022-04-20 03-25-18