New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreos-metadata race condition on Microsoft Azure #1582

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

Comments

@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

This comment has been minimized.

Member

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

This comment has been minimized.

Member

crawford commented Nov 1, 2016

@crawford crawford closed this Nov 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment