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

Preflight checks fail when directories are not present #85

Closed
JacobReynolds opened this issue Jan 24, 2024 · 1 comment
Closed

Preflight checks fail when directories are not present #85

JacobReynolds opened this issue Jan 24, 2024 · 1 comment
Labels
defect Suspected defect such as a bug or regression

Comments

@JacobReynolds
Copy link

JacobReynolds commented Jan 24, 2024

Observed behavior

When using the simple.json preflight checks, the command fails if the directories are not already present.

Expected behavior

Preflight checks should create any required nested directories.

Nex and NATS version

root@nats-client:~# nex --version
vdevelopment [] | Built-on: 

Host environment

Ubuntu 23.10 x64

Steps to reproduce

I'm using a clean Ubuntu 23.10 x64 droplet in Digital Ocean, with golang and the nats CLI installed.

  1. Install nex cli
  2. Save https://github.com/synadia-io/nex/blob/main/examples/nodeconfigs/simple.json to your local directory
root@nats-client:~# nex node preflight --config simple.json 
Validating - Required CNI Plugins [/opt/cni/bin]
	⛔ Missing Dependency - /opt/cni/bin/host-local [host-local CNI plugin]
	⛔ Missing Dependency - /opt/cni/bin/ptp [ptp CNI plugin]
	⛔ Missing Dependency - /opt/cni/bin/tc-redirect-tap [tc-redirect-tap CNI plugin]

Validating - Required binaries [/usr/local/bin]
	⛔ Missing Dependency - /usr/local/bin/firecracker [Firecracker VM binary]

Validating - CNI configuration requirements [/etc/cni/conf.d]
	⛔ Missing Dependency - /etc/cni/conf.d/fcnet.conflist [CNI Configuration]

Validating - User provided files []
	⛔ Missing Dependency - /tmp/wd/vmlinux [VMLinux Kernel]
	⛔ Missing Dependency - /tmp/wd/rootfs.ext4 [Root Filesystem Template]

⛔ You are missing required dependencies for [Required CNI Plugins], do you want to install? [y/N] y
open /opt/cni/bin/ptp: no such file or directory
panic: preflight checks failed: open /opt/cni/bin/ptp: no such file or directory

goroutine 1 [running]:
github.com/synadia-io/nex/internal/node.CmdPreflight(0x1114db0?, 0x1784a80, {0xe58680?, 0xc0003fab40?}, 0xc0003fab40?, 0xc00046c5f0?)
	/root/go/pkg/mod/github.com/synadia-io/[email protected]/internal/node/init.go:140 +0x96
main.RunNodePreflight(0x40e44c?)
	/root/go/pkg/mod/github.com/synadia-io/[email protected]/nex/node_linux_amd64.go:33 +0x179
github.com/choria-io/fisk.(*actionMixin).applyActions(...)
	/root/go/pkg/mod/github.com/choria-io/[email protected]/actions.go:28
github.com/choria-io/fisk.(*Application).applyActions(0xc00047f400?, 0xc00019e000)
	/root/go/pkg/mod/github.com/choria-io/[email protected]/app.go:823 +0xdf
github.com/choria-io/fisk.(*Application).execute(0xc00047f400, 0xc00019e000?, {0xc0003fab80, 0x2, 0x2})
	/root/go/pkg/mod/github.com/choria-io/[email protected]/app.go:609 +0x65
github.com/choria-io/fisk.(*Application).Parse(0xc00047f400, {0xc000100060?, 0xc0004eb650?, 0x30?})
	/root/go/pkg/mod/github.com/choria-io/[email protected]/app.go:272 +0x16c
github.com/choria-io/fisk.(*Application).MustParseWithUsage(0xc00047f400, {0xc000100060, 0x4, 0x4})
	/root/go/pkg/mod/github.com/choria-io/[email protected]/app.go:889 +0x45
main.main()
	/root/go/pkg/mod/github.com/synadia-io/[email protected]/nex/nex.go:94 +0x41f7

If you run mkdir /opt/cni/bin and run again, the CNI Plugins step succeeds but then fails on CNI configuration requirements. After resolving that issue, it fails again at User provided files. After creating all required directories, preflight succeeds.

@JacobReynolds JacobReynolds added the defect Suspected defect such as a bug or regression label Jan 24, 2024
@jordan-rash
Copy link
Contributor

This was in the README a week ago, not sure why we removed it. Probably an oversight. We are aware and will be fixing it soon 😁 Thanks for letting us know!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants