Ensure-availability fails with ' failed to find any voting machines' after backup/restore.

Bug #1420306 reported by Jorge Niedbalski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Horacio Durán
1.21
Fix Released
High
Horacio Durán
1.22
Fix Released
High
Horacio Durán

Bug Description

[Versions]

ubuntu@niedbalski2-bastion:~$ juju --version
1.21.1-trusty-amd64
ubuntu@niedbalski2-bastion:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

[Description]

ubuntu@niedbalski2-bastion:~$ juju status -v
environment: niedbalski2
machines:
  "0":
    agent-state: started
    agent-version: 1.21.1
    dns-name: 10.5.0.61
    instance-id: 225fbf72-f753-4fa0-bbf4-e925dd6581a9
    instance-state: ACTIVE
    series: trusty
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=20480M
    state-server-member-status: has-vote
  "1":
    agent-state: started
    agent-version: 1.21.1
    dns-name: 10.5.0.62
    instance-id: 3c75f984-7282-4913-9d20-00332af5464f
    instance-state: ACTIVE
    series: trusty
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=20480M
    state-server-member-status: has-vote
  "2":
    agent-state: started
    agent-version: 1.21.1
    dns-name: 10.5.0.63
    instance-id: e483e28c-de0c-407f-be6c-f4363fe57edf
    instance-state: ACTIVE
    series: trusty
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=20480M
    state-server-member-status: has-vote
services: {}

ubuntu@niedbalski2-bastion:~$ nova delete 225fbf72-f753-4fa0-bbf4-e925dd6581a9
ubuntu@niedbalski2-bastion:~$ nova delete 3c75f984-7282-4913-9d20-00332af5464f
ubuntu@niedbalski2-bastion:~$ nova delete e483e28c-de0c-407f-be6c-f4363fe57edf
ubuntu@niedbalski2-bastion:~$ juju status

Hangs..

ubuntu@niedbalski2-bastion:~$ juju restore -e niedbalski2 juju-backup-20150210-1352.tgz
extracted credentials from backup file
re-bootstrapping environment
Bootstrapping environment "niedbalski2"
Starting new instance for initial state server
Launching instance
 - 7642836a-571e-4c7e-8a11-e6d2645bc7c8
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to 10.5.0.64:22
Warning: Permanently added '10.5.0.64' (ECDSA) to the list of known hosts.
Logging to /var/log/cloud-init-output.log on remote host
Running apt-get update
Running apt-get upgrade
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Fetching tools: curl -sSfw 'tools from %{url_effective} downloaded: HTTP %{http_code}; time %{time_total}s; size %{size_download} bytes; speed %{speed_download} bytes/s ' --retry 10 -o $bin/tools.tar.gz <[https://streams.canonical.com/juju/tools/releases/juju-1.21.1-trusty-amd64.tgz]>
Bootstrapping Juju machine agent

Starting Juju machine agent (jujud-machine-0)
Bootstrap complete
connecting to newly bootstrapped instance
restoring bootstrap machine
copying backup file to bootstrap host
updating bootstrap machine
restored bootstrap machine
opening state
updating all machines
ubuntu@niedbalski2-bastion:~$ juju status
WARNING ignoring invalid cached API endpoint environment UUID
environment: niedbalski2
machines:
  "0":
    agent-state: started
    agent-version: 1.21.1
    dns-name: 10.5.0.61
    instance-id: 225fbf72-f753-4fa0-bbf4-e925dd6581a9
    instance-state: ACTIVE
    series: trusty
    hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=20480M
    state-server-member-status: has-vote
services: {}
ubuntu@niedbalski2-bastion:~$ juju ensure-availability
ERROR internal error, failed to find any voting machines
ubuntu@niedbalski2-bastion:~$
ubuntu@niedbalski2-bastion:~$ juju ensure-availability -n 3
ERROR internal error, failed to find any voting machines

description: updated
Curtis Hovey (sinzui)
tags: added: backup-restore ha
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.23
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Seems that setting the votingmachineids[0] to string(0) works as a workaround until the patch arrives.

juju:PRIMARY> db.stateServers.update({"_id":"e"}, {$set:{"machineids" : ["0"]}})
juju:PRIMARY> db.stateServers.update({"_id":"e"}, {$set:{"votingmachineids" : ["0"]}})

Thanks.

Changed in juju-core:
assignee: nobody → Horacio Durán (hduran-8)
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
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.23 → 1.23-beta1
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.