TritonDataCenter / sdc-docker

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

support static ip #158

Open Smithx10 opened 3 years ago

Smithx10 commented 3 years ago

Addresses #157

teutat3s commented 2 years ago

make check is looking green here. If I understand the file https://github.com/joyent/sdc-docker/blob/master/tools/check-docs.sh correctly, it only checks in the docs/ directory, where no changes were made - or did you mean missing docs?

bahamat commented 2 years ago

@teutat3s It's a bit confusing, because the target is check::. The double colon means there are multiple targets with the same name and running make check executes all of them. The other checks are defined in deps/eng/tools/mk/Makefile.targ (which is a submodule).

Specifically, the following sub-checks fail:

teutat3s commented 2 years ago

@bahamat thanks for clarifying, I'll see what I can do to contribute and fix these failing sub-checks.

teutat3s commented 2 years ago

@Smithx10 I tried addressing the make check errors in https://github.com/Smithx10/sdc-docker/pull/1 Feedback welcome!

teutat3s commented 2 years ago

@bahamat make check should be all green now.

EDIT: probably this is required before merging this? https://github.com/joyent/node-triton-tags/pull/5

bahamat commented 2 years ago

Ok, this is looking good so far.

I'd like to see at least some integration tests created, and the test run to see the results.

The following tests should be created:

In order to do this, you'll need an image built that includes joyent/node-triton-tags#5. The easiest way to do that is to change package.json in this commit to point triton-tags at https://github.com/Smithx10/node-triton-tags#e4c543ffad2e36e180e7446b5527223cb413c39f and our Jenkins will build an image for you and put it in the experimental channel.

teutat3s commented 2 years ago

@bahamat should the image already be built or does it take a bit?

[root@headnode (dc-1) ~]# sdcadm avail -C experimental docker
SERVICE  IMAGE                                 VERSION
docker   5f7af963-c87c-432a-b04f-be2784298487  docker@PR-158-20211119T162303Z-gf1a5a92
bahamat commented 2 years ago

@teutat3s I think automatic builds only happen when they come from joyent owned repos (otherwise it could be dangerous). I've kicked off a build so you should see it in a few minutes.

teutat3s commented 2 years ago

Something seems to be broken in that image:

EDIT: Maybe a sync with joyent/node-triton-tags's master branch is necessary?

Click to expand ``` [ Dec 15 15:17:35 Enabled. ] [ Dec 15 15:17:35 Rereading configuration. ] [ Dec 15 15:17:41 Executing start method ("/opt/smartdc/docker/smf/method/docker start"). ] + . /lib/svc/share/smf_include.sh ++ SMF_EXIT_OK=0 ++ SMF_EXIT_NODAEMON=94 ++ SMF_EXIT_ERR_FATAL=95 ++ SMF_EXIT_ERR_CONFIG=96 ++ SMF_EXIT_MON_DEGRADE=97 ++ SMF_EXIT_MON_OFFLINE=98 ++ SMF_EXIT_ERR_NOSMF=99 ++ SMF_EXIT_ERR_PERM=100 + PATH=/usr/sbin:/usr/bin + export PATH + case "$1" in + exit 0 + /usr/bin/ctrun -l child -o noorphan /opt/smartdc/docker/build/node/bin/node --abort_on_uncaught_exception /opt/smartdc/docker/lib/docker.js [ Dec 15 15:17:41 Method "start" exited with status 0. ] [2021-12-15T15:17:43.234Z] INFO: docker/57712 on 88e4c263-658f-4b02-a698-d5637a256f81: Loading config from "/opt/smartdc/docker/etc/config.json" Uncaught Error: Cannot find module './cmon-groups-tag' FROM Function.Module._load (module.js:478:5) Module.require (module.js:504:17) require (internal/module.js:20:19) Object. (/opt/smartdc/docker/node_modules/triton-tags/lib/index.js:35:21) Module._compile (module.js:577:32) Object.Module._extensions..js (module.js:586:34) Module.load (module.js:494:32) tryModuleLoad (module.js:453:12) Function.Module._load (module.js:445:3) Module.require (module.js:504:17) require (internal/module.js:20:19) Object. (/opt/smartdc/docker/lib/backends/sdc/utils.js:16:19) Module._compile (module.js:577:32) Object.Module._extensions..js (module.js:586:34) Module.load (module.js:494:32) tryModuleLoad (module.js:453:12) Function.Module._load (module.js:445:3) Module.require (module.js:504:17) require (internal/module.js:20:19) Object. (/opt/smartdc/docker/lib/backends/sdc/images.js:57:13) Module._compile (module.js:577:32) Object.Module._extensions..js (module.js:586:34) Module.load (module.js:494:32) tryModuleLoad (module.js:453:12) Function.Module._load (module.js:445:3) Module.require (module.js:504:17) require (internal/module.js:20:19) Object. (/opt/smartdc/docker/lib/backends/sdc/build.js:28:14) Module._compile (module.js:577:32) Object.Module._extensions..js (module.js:586:34) Module.load (module.js:494:32) tryModuleLoad (module.js:453:12) Function.Module._load (module.js:445:3) Module.require (module.js:504:17) require (internal/module.js:20:19) Object. (/opt/smartdc/docker/lib/backends/sdc/index.js:17:13) Module._compile (module.js:577:32) Object.Module._extensions..js (module.js:586:34) Module.load (module.js:494:32) tryModuleLoad (module.js:453:12) Function.Module._load (module.js:445:3) Module.require (module.js:504:17) require (internal/module.js:20:19) new App (/opt/smartdc/docker/lib/docker.js:75:19) main (/opt/smartdc/docker/lib/docker.js:649:15) Object. (/opt/smartdc/docker/lib/docker.js:653:1) Module._compile (module.js:577:32) Object.Module._extensions..js (module.js:586:10) Module.load (module.js:494:32) tryModuleLoad (module.js:453:12) Function.Module._load (module.js:445:3) Module.runMain (module.js:611:10) run (bootstrap_node.js:394:7) startup (bootstrap_node.js:160:9) bootstrap_node.js:507:3 [ Dec 15 15:17:44 Stopping because all processes in service exited. ] [ Dec 15 15:17:44 Executing stop method (:kill). ] ```
teutat3s commented 2 years ago

@bahamat would you be so kind and trigger another build? Or do you have an idea what else could have gone wrong with that image?

bahamat commented 2 years ago

Build started. Should be ready in about 5 minutes from now.

teutat3s commented 2 years ago

Same result. Could there be a step missing in the build process? It seems the .pegjs files are not rendered?

[root@88e4c263-658f-4b02-a698-d5637a256f81 (dc-1:docker0) ~]# ls /opt/smartdc/docker/node_modules/triton-tags/lib
cmon-groups-tag.pegjs  cns-svc-tag.pegjs  index.js

EDIT: It seems those files are only rendered when cutting a new release, is there a workaround to get those into the experimental image? https://github.com/joyent/node-triton-tags/blob/6d78099450aae993bededf03bf71f085ac700d55/Makefile#L33-L41