Project

General

Profile

Actions

Bug #10650

closed

Race condition in discovery-setup.path

Added by Jasper Capel over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Image
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

discovery-debug.txt discovery-debug.txt 88.6 KB Jasper Capel, 05/29/2015 06:36 AM

Related issues 1 (0 open1 closed)

Related to Discovery - Feature #10831: Introduce fdi.zipserver kernel command line optionResolved06/16/2015Actions
Actions #1

Updated by Jasper Capel over 9 years ago

I think discovery-setup.service should have:

After=discovery-setup.path
Actions #2

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?

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Lukas Zapletal over 9 years ago

  • Related to Feature #10831: Introduce fdi.zipserver kernel command line option added
Actions #7

Updated by Lukas Zapletal over 9 years ago

This was resolved in recent commits. Will be part of 4.0.

Actions #8

Updated by Lukas Zapletal almost 9 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)
Actions

Also available in: Atom PDF