Bug #10650
closedRace condition in discovery-setup.path
Description
I created a discovery image extension to add a few facts. This is not downloaded from the TFTP server by discovery-setup when the image is booting:
May 29 11:40:28 fdi discovery-setup[1257]: Extension at: tftp:///cloudfacts.zip May 29 11:40:28 fdi discovery-setup[1257]: TFTP error downloading cloudfacts.zip: (to)
When logging in to the image using SSH and running discovery-setup, the facts are downloaded correctly:
[root@fdi ~]# discovery-setup Extension at: tftp://172.31.0.130/cloudfacts.zip
This is using the 2.1.1 discovery image.
Files
Updated by Jasper Capel over 9 years ago
I think discovery-setup.service should have:
After=discovery-setup.path
Updated by Lukas Zapletal over 9 years ago
Hello, thanks for the report. We need to download the extension early, before discovery-register and foreman-proxy start up. I am not following your last comment. Did you mean
After=network.service
rather than what you provided?
Updated by Jasper Capel over 9 years ago
Lukas Zapletal wrote:
Hello, thanks for the report. We need to download the extension early, before discovery-register and foreman-proxy start up. I am not following your last comment. Did you mean
After=network.service
rather than what you provided?
No. discovery-setup.service should (I think) run after discovery-setup.path. As the discovery-setup.path creates a file which contains the ZIP_SERVER environment variable which is required by discovery-setup.service. Currently there is a race condition, where sometimes this file does not yet exist when starting discovery-setup.service, which results in a failure to download the extensions.
Updated by Lukas Zapletal over 9 years ago
- Subject changed from Error downloading discovery plugin to Race condition in discovery-setup.path
- Status changed from New to Assigned
- Assignee set to Lukas Zapletal
Yeah I get it now.
Updated by Lukas Zapletal over 9 years ago
- Pull request https://github.com/theforeman/foreman-discovery-image/pull/14 added
- Pull request deleted (
)
Can you take a look to https://github.com/theforeman/foreman-discovery-image/pull/14 ?
I will trigger image build, will send the URL in a minute there. I need a confirmation it works for you. Having trouble to repro on my libvirt setup.
Updated by Lukas Zapletal over 9 years ago
- Related to Feature #10831: Introduce fdi.zipserver kernel command line option added
Updated by Lukas Zapletal over 9 years ago
This was resolved in recent commits. Will be part of 4.0.
Updated by Lukas Zapletal over 8 years ago
- Status changed from Assigned to Closed
- Pull request https://github.com/theforeman/foreman-discovery-image/pull/18 added
- Pull request deleted (
https://github.com/theforeman/foreman-discovery-image/pull/14)