coreos-metadata race condition on Microsoft Azure #1582

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

Comments

@omkensey

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.

Show comment
Hide comment
@crawford

crawford Sep 28, 2016

Member

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"
      }]
    }]
  }
}
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 crawford modified the milestone: CoreOS Alpha 1221.0.0 Oct 19, 2016

@crawford crawford referenced this issue in coreos/coreos-metadata Nov 1, 2016

Merged

providers/azure: wait for dhcp lease #26

@crawford crawford self-assigned this Nov 1, 2016

@crawford

This comment has been minimized.

Show comment
Hide comment
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