Incorrect status message for LXD VM machine

Bug #2049461 reported by Andrew Liaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Low priority.

The juju machine status message uses the word "container", when a LXD VM is created.
This might confuse the user as the machine is a VM and not a container.

Some sample message:
message: Creating container
message: Container started

- Which juju version this bug was seen in (e.g. 2.9.22)?
3.1.6 controller
3.1.7 client
- What cloud the bug was seen on (e.g aws, microk8s, lxd etc.)?
local LXD cloud.

- What are the reproduction steps if you are able to be reproduce?

Deploy a machine charm on a LXD controller with the virt-type constraint to virtual-machine:
`juju deploy --constraints="virt-type=virtual-machine" tiny-bash`

Use `juju show-machine <machine_id>` or `juju status` to see the status message.
Some sample message with `juju show-machine`:
```
    machine-status:
      current: allocating
      message: Creating container
      since: 16 Jan 2024 12:18:25+08:00
```
```
    machine-status:
      current: running
      message: Container started
      since: 16 Jan 2024 12:18:28+08:00
```

Optional: Using `lxc list` should confrim the this is a virtual machine instance and not a container:
```
| juju-3106ff-57 | RUNNING | 10.176.39.106 (enp5s0) | | VIRTUAL-MACHINE | 0 |
```

Revision history for this message
Joseph Phillips (manadart) wrote :

This should be simple. At the time these statuses are emitted, I believe we will have the type on hand.

Incidentally, we might as well change the messages for KVM brokerage at the same time.

$ ag 'Creating container'
provider/lxd/environ_broker.go
138: _ = statusCallback(status.Allocating, "Creating container", nil)

container/lxd/manager.go
123: _ = callback(status.Provisioning, "Creating container spec", nil)
126: _ = callback(status.ProvisioningError, fmt.Sprintf("Creating container spec: %v", err), nil)
130: _ = callback(status.Provisioning, "Creating container", nil)
133: _ = callback(status.ProvisioningError, fmt.Sprintf("Creating container: %v", err), nil)

container/kvm/kvm.go
168: _ = callback(status.ProvisioningError, fmt.Sprintf("Creating container: %v", err), nil)
239: _ = callback(status.Provisioning, "Creating container; it might take some time", nil)

$ ag 'Container started'
provider/lxd/environ_broker.go
143: _ = statusCallback(status.Running, "Container started", nil)

container/lxd/manager.go
136: _ = callback(status.Running, "Container started", nil)

container/kvm/kvm.go
257: _ = callback(status.Running, "Container started", nil)

Changed in juju:
status: New → Triaged
importance: Undecided → Low
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.