storageprovisioner: ignore incoherent volumes #8098

Merged
merged 1 commit into from Nov 17, 2017

Conversation

Projects
None yet
3 participants
Member

axw commented Nov 17, 2017

Description of change

In Juju, volumes cannot be provisioned without
an attachment to a machine. This is because
volumes are typically required to exist in the
same availability zone as the machine; so we
create the volume in the same AZ as the machine
to which it is intitially attached.

Because of this, the storage provisioner and
storage providers assume that an unprovisioned,
Alive, volume will have an attachment. It has
been observed in the wild that this does not
always hold true.

This change prevents the storage provisioner
from panicking upon seeing such volumes, but
does nothing to prevent the incoherent state
from occurring in the first place. It is not
clear how this can happen yet; it is possibly
an artifact of upgrading from an older version.

QA steps

(does not mimic a realistic scenario, as we have no reproduction steps; --disks is not an advertised feature)

  1. juju bootstrap openstack
  2. juju add-machine --disks cinder,1G && juju remove-machine 0
  3. juju debug-log -m controller
    (should not be any panics)

Documentation changes

None.

Bug reference

Partially fixes https://bugs.launchpad.net/juju/+bug/1732616

+ // NOTE(axw) this would only happen if the model is
+ // in an incoherent state; we should never have an
+ // alive, unprovisioned, and unattached volume.
+ logger.Debugf(
@wallyworld

wallyworld Nov 17, 2017

Owner

If we don't expect this should it be a warning?

@axw

axw Nov 17, 2017

Member

yeah probably - changed

storageprovisioner: ignore incoherent volumes
In Juju, volumes cannot be provisioned without
an attachment to a machine. This is because
volumes are typically required to exist in the
same availability zone as the machine; so we
create the volume in the same AZ as the machine
to which it is intitially attached.

Because of this, the storage provisioner and
storage providers assume that an unprovisioned,
Alive, volume will have an attachment. It has
been observed in the wild that this does not
always hold true.

This change prevents the storage provisioner
from panicking upon seeing such volumes, but
does nothing to prevent the incoherent state
from occurring in the first place. It is not
clear how this can happen yet; it is possibly
an artifact of upgrading from an older version.

Partially fixes https://bugs.launchpad.net/juju/+bug/1722818
Member

axw commented Nov 17, 2017

$$merge$$

Contributor

jujubot commented Nov 17, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 8b25dfc into juju:2.2 Nov 17, 2017

1 check failed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment