-
Notifications
You must be signed in to change notification settings - Fork 23
Use libisofs #24
base: master
Are you sure you want to change the base?
Use libisofs #24
Conversation
lumjjb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. 2 small build comments, we need to figure out a way to propagate the error.
| 1. Ensure that your `GOPATH` is set. (https://github.com/golang/go/wiki/SettingGOPATH) | ||
| 2. Go get the repo `go get github.com/nabla-containers/runnc` | ||
| 3. Install genisoimage on host `sudo apt install genisoimage` | ||
| 3. Install libisofs on host `sudo apt install libisofs-dev` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this may potentially break the container-build, can you verify that it still works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with the latest commit.
| 0. Install libisofs on host | ||
| ``` | ||
| sudo apt install genisoimage | ||
| sudo apt install libisofs-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think that if the developer skips this step now, they actually won't see any error since OCI doesn't propagate it unless it's in a log file. I tried this with removing a library from it:
lumjjb@lumjjb-ThinkPad-P50:/usr/local/bin$ sudo mv /lib/x86_64-linux-gnu/libseccomp.so.2 ~/.
lumjjb@lumjjb-ThinkPad-P50:/usr/local/bin$ ldd runnc
linux-vdso.so.1 => (0x00007fff7a5bc000)
libseccomp.so.2 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcf9d525000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcf9d8ef000)
lumjjb@lumjjb-ThinkPad-P50:/usr/local/bin$ sudo docker run --rm --runtime=runnc nablact/node-express-nabla
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/ae631e5c0e29037b30c8b9f03c149490841e880d832ed645064a713400f08e99/log.json: no such file or directory): /usr/local/bin/runnc did not terminate sucessfully: unknown.
lumjjb@lumjjb-ThinkPad-P50:/usr/local/bin$ ./runnc
./runnc: error while loading shared libraries: libseccomp.so.2: cannot open shared object file: No such file or directory
lumjjb@lumjjb-ThinkPad-P50:/usr/local/bin$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea with this change is checking libisofs at build time, not really at runtime. In any case, at runtime, we would have to check for other libraries as well, like all the ones that runnc depends on and libseccomp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case, genisoimage is still used for tests.
Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
- also move createDummy (disk) from nabla-lib/storage to runnc-cont so runnc-cont doesn't have to link against libisofs. Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
Signed-off-by: Ricardo Koller <[email protected]>
Use libisofs (as a shared library) instead of the genisoimage command. This is better than using the genisoimage command because the compiler doesn't complain if genisoimage is not installed, and that can lead to failures like in issue #22. If the libisofs-dev package is not present,
go buildwill clearly complain that libisofs.h is not present.