Duplicate link layer device entries when running on AWS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Joseph Phillips |
Bug Description
Unfortunately, the ec2 API does not report the device names for network interfaces. Currently, the ec2 provider implementation populates the device names with a placeholder value which is generated by concatenating the string "unsupported" with the device index.
The machiner worker periodically sends its own view of the machine network devices (with the correct names) to the controller where this information gets merged together with the information obtained by the environment and is used to upsert the entries in the "link layer device" and "ip.address" collections.
It seems that on both 2.6.x and 2.7.x lines, the merge logic does not work as expected since we end up with duplicate entries in these collections. For example, after bootstrapping on ec2 the relevant collections contain entries like:
Link layer devices:
```
{
"_id" : "181280d3-
"name" : "unsupported0",
"mtu" : 0,
"type" : "ethernet",
"is-up" : true,
"txn-revno" : NumberLong(2),
"txn-queue" : [
]
}
...
{
"_id" : "181280d3-
"name" : "ens5",
"mtu" : 9001,
"type" : "ethernet",
"is-up" : true,
"txn-revno" : NumberLong(2),
"txn-queue" : [
]
}
```
IP Addresses (also note that the provider version specifies a different "config-method" and lacks a gateway value):
```
{
"_id" : "181280d3-
"value" : "172.31.36.2",
"txn-revno" : NumberLong(2),
"txn-queue" : [
]
}
...
{
"_id" : "181280d3-
"value" : "172.31.36.2",
"txn-revno" : NumberLong(2),
"txn-queue" : [
]
}
```
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Joseph Phillips (manadart) |
milestone: | none → 2.8-beta1 |
Changed in juju: | |
milestone: | 2.8-beta1 → 2.8-rc1 |
Changed in juju: | |
milestone: | 2.8-rc1 → 2.8.1 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
In discussions with John, it was suggested that we should be merging based on MAC address.