primary charm with a customized lxd profile fails

Bug #1806442 reported by Chris MacNaughton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Simon Richardson

Bug Description

with the following bundle:

# vim: set ts=2 et:
series: bionic

machines:
  0:
    constraints: tags=^nuc spaces=oam-space,ceph-replica-space

applications:
  ubuntu:
    charm: ubuntu
    num_units: 1
    bindings:
      "": oam-space
    to:
      - 0
  nova-compute:
    charm: cs:~chris.macnaughton/nova-compute-profile-0
    num_units: 1
    bindings:
      "": oam-space
    to:
      - lxd:0
  neutron-openvswitch:
    charm: cs:~openstack-charmers-next/neutron-openvswitch
relations:
  - [ neutron-openvswitch, nova-compute ]

I reliably get:

Model Controller Cloud/Region Version SLA Timestamp
olympus-default olympus olympus 2.5-rc1 unsupported 15:50:07+01:00

App Version Status Scale Charm Store Rev OS Notes
neutron-openvswitch waiting 0 neutron-openvswitch jujucharms 329 ubuntu
nova-compute waiting 0/1 nova-compute local 133 ubuntu
ubuntu 18.04 active 1 ubuntu jujucharms 12 ubuntu

Unit Workload Agent Machine Public address Ports Message
nova-compute/0 waiting allocating 0/lxd/0 waiting for machine
ubuntu/0* active idle 0 10.0.4.60 ready

Machine State DNS Inst id Series AZ Message
0 started 10.0.4.60 w66q8g bionic default Deployed
0/lxd/0 down pending bionic cannot upgrade machine's lxd profile: machine 0/lxd/0 not provisioned

Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Simon Richardson (simonrichardson)
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :
Download full text (3.4 KiB)

$ juju version
2.5-rc1-cosmic-amd64

$ snap info juju
name: juju
summary: juju client
publisher: Canonical✓
contact: http://jujucharms.com
license: unset
description: |
  Juju is an open source modelling tool for operating software in the cloud. Juju allows you to
  deploy, configure, manage, maintain, and scale cloud applications quickly and efficiently on
  public clouds, as well as on physical servers, OpenStack, and in containers. You can use Juju from
  the command line or through its GUI.

  In modern environments, applications are rarely deployed in isolation. Even simple applications
  may require several other applications in order to function - like a database and a web server,
  for example. For modeling a more complex system, e.g. OpenStack, many more applications need to be
  installed, configured and connected to each other. Juju's application modelling provides tools to
  express the intent of how to deploy such applications and to subsequently scale and manage them.

  At the lowest level, traditional configuration management tools like Chef and Puppet, or even
  general scripting languages such as Python or bash, automate the configuration of machines to a
  particular specification. With Juju, you create a model of the relationships between applications
  that make up your solution and you have a mapping of the parts of that model to machines. Juju
  then applies the necessary configuration management scripts to each machine in the model.

  Application-specific knowledge such as dependencies, scale-out practices, operational events like
  backups and updates, and integration options with other pieces of software are encapsulated in
  Juju's 'charms'. This knowledge can then be shared between team members, reused everywhere from
  laptops to virtual machines and cloud, and shared with other organizations.

  The charm defines everything you all collaboratively know about deploying that particular
  application brilliantly. All you have to do is use any available charm (or write your own), and
  the corresponding application will be deployed in seconds, on any cloud or server or virtual
  machine.

  https://discourse.jujucharms.com/
  https://docs.jujucharms.com/
  https://github.com/juju/juju
commands:
  - juju
snap-id: e2CPHpB1fUxcKtCyJTsm5t3hN9axJ0yj
tracking: edge
refresh-date: today at 12:24 CET
channels:
  stable: 2.4.7 (6012) 58MB classic
  candidate: ↑
  beta: 2.5-beta3 (6050) 64MB classic
  edge: 2.5-rc1+develop-6a1dc5e (6075) 69MB classic <
  2.5/stable: –
  2.5/candidate: –
  2.5/beta: 2.5-beta3 (6050) 64MB classic
  2.5/edge: ↑
  2.4/stable: 2.4.7 (6012) 58MB classic
  2.4/candidate: ↑
  2.4/beta: ↑
  2.4/edge: 2.4.8+2.4-d4ca58d (6066) 66MB classic...

Read more...

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

I managed to run into this by bootstrapping a controller on maas and deploying the displayed bundle

Changed in juju:
milestone: none → 2.5-rc1
importance: High → Critical
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Reproduced with lxd cloud and smaller bundle

series: bionic
applications:
  nova-compute:
    charm: cs:~chris.macnaughton/nova-compute-profile-0
    num_units: 1
    to:
    - lxd:0
machines:
  "0": {}

Interesting error happened before the last:

machine-0: 15:43:32 ERROR juju.provisioner cannot start instance for machine "0/lxd/0": cannot write charm profile: The device path doesn't exist on the host and major/minor wasn't specified
machine-0: 15:43:32 ERROR juju.provisioner cannot upgrade machine's lxd profile: machine 0/lxd/0 not provisioned

Interesting because it occurred, not because of the contents. Perhaps juju tries to create the container with the profile, but can't write it, then tries to upgrade the profile on an unprovisioned machine.

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

with a different bundle:

machine-3: 16:44:17 INFO juju.container.lxd starting new container "juju-ef870b-3-lxd-0" (image "ubuntu-18.04-server-cloudimg-amd64-lxd.tar.xz")
machine-3: 16:44:17 DEBUG juju.container.lxd new container has profiles [default juju-default-lxd-profile-local-0]
machine-3: 16:44:21 DEBUG juju.container.lxd created container "juju-ef870b-3-lxd-0", waiting for start...
machine-3: 16:44:22 INFO juju.provisioner started machine 3/lxd/0 as instance juju-ef870b-3-lxd-0 with hardware "", network config [{DeviceIndex:0 MACAddress:00:16:3e:b3:a4:56 CIDR:10.224.1.0/24 MTU:1500 ProviderId: ProviderSubnetId: ProviderSpaceId: ProviderAddressId: ProviderVLANId: VLANTag:0 InterfaceName:eth0 ParentInterfaceName:lxdbr0 InterfaceType:ethernet Disabled:false NoAutoStart:false ConfigType:dhcp Address: DNSServers:[10.241.227.1] DNSSearchDomains:[lxd] GatewayAddress: Routes:[] IsDefaultGateway:false}], volumes [], volume attachments map[], subnets to zones map[], lxd profiles [juju-default-lxd-profile-local-0]
machine-3: 16:44:22 DEBUG juju.provisioner processOneMachineProfileChange(3/lxd/0)
machine-3: 16:44:22 DEBUG juju.container.lxd lxd profile "juju-default-lxd-profile-local-0" already exists, not written again
machine-3: 16:44:22 DEBUG juju.container.lxd updated container, waiting on Updating container
machine-3: 16:44:22 DEBUG juju.container.lxd failed to delete profile "juju-default-lxd-profile-local-0": Profile is currently in use

services:
  lxd-profile-local:
    charm: "/home/heather/work/src/github.com/juju/juju/testcharms/charm-repo/quantal/lxd-profile-alt/"
    num_units: 1
    to:
    - lxd:0
machines:
  "0": {}

Revision history for this message
Simon Richardson (simonrichardson) wrote :

There is an ongoing PR, which should help alleviate this situation. The change, updates the underlying management of deploying and upgrading of a charm so that all lxd profiles should be checked before subsequent operations happen.

Therefore we should test the following scenario to see if the PR does help, or if more work is required.

https://github.com/juju/juju/pull/9513

Changed in juju:
status: Triaged → In Progress
Revision history for this message
Tim Penhey (thumper) wrote :

PR merged, and QAed.

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
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.