deploying into kvm with local provider, hostnames are not unique

Bug #1326091 reported by Nobuto Murata
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Wayne Witzel III

Bug Description

When deploying a node into kvm with local provider:
$ juju deploy --to kvm:0 SERVICE

Every node will have the same hostname "ubuntu" which is not unique in the environment.
Expected result is that every node has a unique hostname like $USER-local-machine-0-kvm-1 as well as other lxc containers.

$ virsh list
 Id Name State
----------------------------------------------------
 28 nobuto-local-machine-0-kvm-0 running
 29 nobuto-local-machine-0-kvm-1 running
 30 nobuto-local-machine-0-kvm-2 running
 31 nobuto-local-machine-0-kvm-3 running

$ juju run --service nova-compute 'hostname'
- MachineId: 0/kvm/1
  Stdout: 'ubuntu

'
  UnitId: nova-compute/0
- MachineId: 0/kvm/3
  Stdout: 'ubuntu

'
  UnitId: nova-compute/1

juju-core:
  Installed: 1.19.3-0ubuntu1~14.10.1~juju1
  Candidate: 1.19.3-0ubuntu1~14.10.1~juju1
  Version table:
 *** 1.19.3-0ubuntu1~14.10.1~juju1 0
        500 http://ppa.launchpad.net/juju/devel/ubuntu/ utopic/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.1-0ubuntu1 0
        500 http://jp.archive.ubuntu.com/ubuntu/ utopic/universe amd64 Packages
juju-local:
  Installed: 1.19.3-0ubuntu1~14.10.1~juju1
  Candidate: 1.19.3-0ubuntu1~14.10.1~juju1
  Version table:
 *** 1.19.3-0ubuntu1~14.10.1~juju1 0
        500 http://ppa.launchpad.net/juju/devel/ubuntu/ utopic/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.1-0ubuntu1 0
        500 http://jp.archive.ubuntu.com/ubuntu/ utopic/universe amd64 Packages

Revision history for this message
Nobuto Murata (nobuto) wrote :

It looks like juju does not put hostname in cloud-config.
no hostname line in /var/lib/cloud/instance/user-data.txt.

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → next-stable
tags: added: kvm local-provider
Curtis Hovey (sinzui)
Changed in juju-core:
importance: High → Medium
milestone: next-stable → none
Revision history for this message
Adam Stokes (adam-stokes) wrote :

We've run into this issue as well. Ceph will fail to report its status when units are KVM as ceph relies on the machine name:

http://paste.ubuntu.com/10391261/

Using juju 1.20.11, trusty 14.04.1, local provider

tags: added: cloud-installer
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.24
importance: Medium → High
Changed in juju-core:
assignee: nobody → Wayne Witzel III (wwitzel3)
Changed in juju-core:
status: Triaged → In Progress
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Nobuto Murata (nobuto)
tags: added: cpec
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.