TritonDataCenter / sdc-docker

Docker Engine for Triton
Mozilla Public License 2.0
182 stars 49 forks source link

Docker api crashing. #171

Closed Adel-Magebinary closed 1 year ago

Adel-Magebinary commented 1 year ago

Hey team,

We removed a key from the admin console and after using the same key to query docker API, it crashes the service.

[2023-06-20T04:34:03.109Z]  INFO: docker/80205 on f018e6ec-9d3a-4628-81dd-a6cbbe59ec73: ufds.getKey err (req_id=ad0cd6bc-866d-4ae7-93b5-525a3e878e18, login=admin, authn=true, err.code=ResourceNotFound)
    **ResourceNotFoundError: 49:a8:XX:XX ... does not exist**
        at /opt/smartdc/docker/node_modules/ufds/lib/index.js:1277:28
        at f (/opt/smartdc/docker/node_modules/once/once.js:17:25)
        at EventEmitter.<anonymous> (/opt/smartdc/docker/node_modules/ufds/lib/index.js:3177:13)
        at emitOne (events.js:96:13)
        at EventEmitter.emit (events.js:188:7)
        at _done (/opt/smartdc/docker/node_modules/ldapjs/lib/client/client.js:1133:22)
        at messageCallback (/opt/smartdc/docker/node_modules/ldapjs/lib/client/client.js:1219:16)
        at Parser.onMessage (/opt/smartdc/docker/node_modules/ldapjs/lib/client/client.js:833:14)
        at emitOne (events.js:96:13)
        at Parser.emit (events.js:188:7)
Uncaught AssertionError: "args.inputs" must be specified and must be an array

FROM
fail (assert.js:84:3)
Function.ok (assert.js:97:15)
Object.forEachParallel (/opt/smartdc/docker/node_modules/vasync/lib/vasync.js:133:13)
getAdminRoleKeys (/opt/smartdc/docker/lib/auth.js:186:16)
Immediate.<anonymous> (/opt/smartdc/docker/node_modules/vasync/lib/vasync.js:803:12)
runCallback (timers.js:672:20)
tryOnImmediate (timers.js:645:5)
processImmediate [as _immediateCallback] (timers.js:617:5)
[ Jun 20 04:34:03 Stopping because all processes in service exited. ]
[ Jun 20 04:34:03 Executing stop method (:kill). ]
[ Jun 20 04:34:03 Executing start method ("/opt/smartdc/docker/smf/method/docker start"). ]
bahamat commented 1 year ago

Filed internally as TRITON-2397.

bahamat commented 1 year ago

This has been fixed in #172 and will be included in the next release. You can install the prerelease version from the dev channel using the following command:

sdcadm update -C dev docker
Adel-Magebinary commented 1 year ago

woohoo Thank you @bahamat and mnx team!