NERSC / shifter

Shifter - Linux Containers for HPC
Other
352 stars 63 forks source link

shifter implicitly requires '/etc/resolv.conf' be present #142

Open alanm-cray opened 8 years ago

alanm-cray commented 8 years ago

When /etc/resolv.conf is not present, shifter will emit the following fatal error:

Source file /etc/resolv.conf does not exist. Cannot copy Failed to copy /etc/resolv.conf to /var/udiMount/etc/resolv.conf FAILED to mkdir /var/udiMount/etc/ssh. Exiting. FAILED to mount image into UDI FAILED to setup image.

In order to run, shifter requires that the '/etc/resolv.conf' be present. On Cray systems with RSIP disabled, this is not the case; it would seem that with Rhine/Redwood, the resolv.conf is only created on compute nodes if RSIP is enabled (and presumably configured). Thus there is an apparent implicit requirement that shifter needs RSIP enabled for Cray systems.

Could shifter be modified to not require /etc/resolv.conf? Or, as an alternative, allow /etc/shifter/shifter_etc_files/resolv.conf to function as a replacement for /etc/resolv.conf?

dmjacobsen commented 6 years ago

I can make this optional, i.e., not fail if resolv.conf does not exist. I'm wondering if there is a problem with the container being able to define its own resolv.conf. What I mean, is if I didn't get a resolv.conf from the host, should it not be permitted to come from the container image (if it exists), or is that a non-issue?