stage1: generate empty vol if a required one is not provided #1753
Conversation
The warning is not very visible and it can be easily be confused with the app's output:
Maybe we should think about using a color library like https://github.com/fatih/color for warnings? |
Semaphore fails because we were relying on the fact that Now that an implicit empty volume is generated, etcd keeps running. This interrupts the test run and eventually it times out. |
Fixed the test. |
@robszumski UX check? |
I think this is the right move. A user wasn't very concerned with the volume since they didn't use it, hence the data getting GC'd isn't a big deal. We need to add some docs for this, at least just updating this comment:
(from https://coreos.com/rkt/docs/latest/subcommands/run.html) |
This is still the case. If you specify a volume but there's no matching mount point (or --mount flag), it will get ignored. I'll clarify that and explain implicit empty volumes in the run docs. |
"You can inspect the volumes with:\n\t%v\n"+ | ||
"App %q requires the following volumes:\n\t%v", | ||
mp.Name, mp.Path, appName, catCmd, appName, volumeCmd) | ||
fmt.Fprintf(os.Stderr, "rkt: warning: no volume specified for mount point %q, implicitly creating an \"empty\" volume. This volume will be removed when the pod gets garbage-collected.\n", mp.Name) |
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.
Wouldn't "when the pod is garbage-collected" sound better?
Small nit, otherwise LFAD. When merged, could you create an issue about warnings being barely visible (with a suggestion of using some colored output for them)? Thanks. |
Oh, and close #1772 please, when you merge it. |
If there is a mount point in the Image Manifest but the user didn't provide a matching volume, we create an implicity empty volume. We warn the user because the empty volume will be deleted when the pod gets garbage-collected.
We now generate an implicit empty volume if a mount point is specified in the image but no volume is passed to rkt. Some test cases in TestFetch were relying on the fact that rkt doesn't actually run these images. Fix the test by adding an `--exec /dev/null` to make the images not run.
Also, clarify that empty volumes are removed when the pod is garbage collected.
e2e0eaa
to
624264b
Compare
|
stage1: generate empty vol if a required one is not provided
If there is a mount point in the Image Manifest but the user didn't
provide a matching volume, we create an implicity empty volume.
We warn the user because the empty volume will be deleted when the pod
gets garbage-collected.
Fixes #1480
Closes #1772