Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support static ip #158

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Smithx10
Copy link

@Smithx10 Smithx10 commented Mar 29, 2021

Addresses #157

Copy link
Member

@bahamat bahamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix make check, but otherwise this looks good.

@teutat3s
Copy link
Member

teutat3s commented Sep 1, 2021

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
Copy link
Member

bahamat commented Sep 1, 2021

@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:

  • check-jsl
  • check-jsstyle
  • check-copyright

@teutat3s
Copy link
Member

teutat3s commented Sep 1, 2021

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

@teutat3s
Copy link
Member

@Smithx10 I tried addressing the make check errors in Smithx10#1
Feedback welcome!

Static addresses: fix make check
@teutat3s
Copy link
Member

teutat3s commented Nov 19, 2021

@bahamat make check should be all green now.

EDIT: probably this is required before merging this?
TritonDataCenter/node-triton-tags#5

@bahamat
Copy link
Member

bahamat commented Nov 19, 2021

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:

  • create instance with IP on owned network gets created properly
  • create instance with multiple IPs on different owned networks
  • create instance with multiple IPs on same owned network
  • create instance with IP on non-owned network gets rejected properly
  • create instance with IP on owned network and IP on non-owned network gets rejected properly

In order to do this, you'll need an image built that includes TritonDataCenter/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
Copy link
Member

@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
Copy link
Member

bahamat commented Dec 14, 2021

@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
Copy link
Member

teutat3s commented Dec 15, 2021

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.<anonymous> (/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.<anonymous> (/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.<anonymous> (/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.<anonymous> (/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.<anonymous> (/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.<anonymous> (/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
Copy link
Member

@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
Copy link
Member

bahamat commented Dec 15, 2021

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

@teutat3s
Copy link
Member

teutat3s commented Dec 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants