Import breaks if Ubuntu 16.04 doesn't have resolvconf directory
anuj919 opened this issue · 4 comments
Image translation fails if the disk image doesn't have resolvconf directory.
[import-and-translate.translate.translate-disk.wait-for-translator]: 2020-06-13T12:22:12Z WaitForInstancesSignal: Instance "inst-translator-import-and-translate-translate-translate-wdpzn": StatusMatch found: "TranslateStatus: Resetting resolvconf base."
[import-and-translate]: 2020-06-13T12:22:12Z Error running workflow: step "translate" run error: step "translate-disk" run error: step "wait-for-translator" run error: WaitForInstancesSignal FailureMatch found for "inst-translator-import-and-translate-translate-translate-wdpzn": "TranslateFailed: error: sh: /bin/sh: 1: cannot create /etc/resolvconf/resolv.conf.d/base: Directory nonexistent"
Ideally this should check if the directory exists before trying to remove clear the resolvconf configs in daisy_workflows/image_import/ubuntu/translate.py
.
A couple of questions:
- Did you modify the VM to remove resolveconf or its configs? If not, any idea why they're missing?
- Can you attach the serial logs from the translate step? You'll find a URL a few lines above the
[import-and-translate]
log that you posted. The log line will look something like this:
CreateInstances: Streaming instance "inst-translator-ubuntu-1604-vmware-translate-test-transl-rxjm8" serial port 1 output to https://storage.cloud.google.com/edens-test-daisy-bkt/daisy-ubuntu-1604-vmware-translate-test-20200619-16:51:57-rxjm8/logs/inst-translator-ubuntu-1604-vmware-translate-test-transl-rxjm8-serial-port1.log
Thanks for taking a look Eric. Reading more about resolvconf
, it indeed comes preinstalled since Ubuntu 12.04 but it is possible to uninstall it. In our case, the package had been uninstalled, unfortunately we don't have internal documentation around when and why this was removed for our setup.
In either case, it would be good to check for the existence of the directory/file before trying to clean up the file as is happening in daisy_workflows/image_import/ubuntu/translate.py
. To unblock ourselves, we were able to create a dummy directory structure in our VM to avoid this problem.
Happy to send out the small patch to fix this (protecting the code path with g.is_file()
) if you think this check should be added.
Please find the serial logs attached.
[1]daisy-import-and-translate-20200613-11_39_44-wdpzn_logs_inst-importer-import-and-translate-import-wdpzn-serial-port1.txt
[2]daisy-import-and-translate-20200613-11_39_44-wdpzn_logs_inst-translator-import-and-translate-translate-translate-wdpzn-serial-port1.txt
Awesome, thanks for the fix!