Skip to content
This repository has been archived by the owner. It is now read-only.

coreos-metadata race condition on Microsoft Azure #1582

Closed
omkensey opened this issue Sep 23, 2016 · 2 comments
Closed

coreos-metadata race condition on Microsoft Azure #1582

omkensey opened this issue Sep 23, 2016 · 2 comments

Comments

@omkensey
Copy link

@omkensey omkensey commented Sep 23, 2016

Issue Report

Bug

CoreOS Version

1122.2.0

Environment

What hardware/cloud provider/hypervisor is being used to run CoreOS?

Microsoft Azure

Expected Behavior

coreos-metadata.service runs normally and generates the IP metadata (COREOS_AZURE_IPV4_DYNAMIC) for the instance.

Actual Behavior

About 1/3 to 1/2 of the time, coreos-metadata runs before DHCP has completed so it can't capture the private IP.

Reproduction Steps

  1. Boot a number of CoreOS VMs on Azure and check for which ones don't get metadata properly.

Other Information

Creating a dropin for coreos-metadata.service to make it require and run after network-online.target works around the issue.

@crawford
Copy link
Member

@crawford crawford commented Sep 28, 2016

For reference, something like this should work:

{
  "ignition": { "version": "2.0.0" },
  "systemd": {
    "units": [{
      "name": "coreos-metadata.service",
      "dropins": [{
        "name": "network-online.conf",
        "contents": "[Service]\nRequires=network-online.target\nAfter=network-online.target"
      }]
    }]
  }
}
@crawford
Copy link
Member

@crawford crawford commented Nov 1, 2016

@crawford crawford closed this Nov 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.