"network is already active" error when bootstraping with the local provider

Bug #873335 reported by Beber
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
Medium
Kapil Thangavelu
juju (Ubuntu)
Fix Released
Undecided
Unassigned
Oneiric
Won't Fix
Medium
Unassigned

Bug Description

I'm using Ubuntu 11.10 beta 2 with juju version 0.5+bzr402-1juju1~oneiric1 (from the PPA) in a VirtualBox VM.

Here are the commands I used after installing Ubuntu :
sudo su -
apt-get update
apt-get install openssh-server python-software-properties
add-apt-repository ppa:juju/pkgs
apt-get update
apt-get install juju apt-cacher-ng libvirt-bin libzookeeper-java lxc zookeeper
ssh-keygen -t rsa -b 2048

cat /root/.juju/environments.yaml
environments:
  sample:
    type: local
    data-dir: /root/local_dev
    admin-secret: password
    default-series: oneiric

juju --verbose bootstrap

The bootstrap command fails with the following error :
2011-10-13 12:23:40,044 INFO Starting networking...
erreur : Impossible de démarrer le réseau default
erreur : Requested operation is not valid: network is already active

After issuing the following command, the bootstraping works fine :
virsh net-destroy default

Tags: local

Related branches

Revision history for this message
rainer (rolfwilhelm) wrote :

I am using Ubuntu Server 11.10 (final) on Virtualbox 4.1.2. I confirgured two interfaces: eth0 NAT, eth1 "host only".
After installing on the virtual machine I only installed juju and configured environment for local usage.
I also tried "virsh net-destroy default" without success

Revision history for this message
rainer (rolfwilhelm) wrote :

Now with *zookeeper* installed, bootstrapping works. I still needed to call "virsh net-destroy default".

Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 873335] Re: "network is already active" error when bootstraping with the local provider

Excerpts from rainer's message of Thu Oct 13 15:51:45 UTC 2011:
> Now with *zookeeper* installed, bootstrapping works. I still needed to
> call "virsh net-destroy default".
>

The docs and code have been updated re the 'zookeeper' dependency. This didn't
make the oneiric release, but will be in an SRU, the public doc site should be
updated about this shortly.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Excerpts from rainer's message of Thu Oct 13 15:29:50 UTC 2011:
> I am using Ubuntu Server 11.10 (final) on Virtualbox 4.1.2. I confirgured two interfaces: eth0 NAT, eth1 "host only".
> After installing on the virtual machine I only installed juju and configured environment for local usage.
> I also tried "virsh net-destroy default" without success
>
> ** Attachment added: "juju_bootstrap.txt"
> https://bugs.launchpad.net/juju/+bug/873335/+attachment/2540038/+files/juju_bootstrap.txt
>

Its odd because juju checks to see if the default is active before attempting to
activate it.

Prior to bootstrapping (and to virsh net-destroy).. it would be interesting to
see what the value of the following command is.

 virsh net-list --all

juju parses that to determine if the 'default' network is already operational,
if so it just uses it. If not it will create or activate it as needed.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Two notes..

1) You don't need to run this all as root! bootstrap will grab sudo access when needed.

2) I opened bug #873540 in the Ubuntu packaging to add Recommends: for these packages, so that most people will get them. The PPA should be built from the distro packaging soon (its not currently)

Changed in juju:
importance: Undecided → Medium
tags: added: local
Revision history for this message
Beber (bertrand-goareguer) wrote :

Here is the output of the "virsh net-list --all" command just after installing all the dependencies :
toto@oneiric-server:~$ virsh net-list --all
Nom État Démarrage automatique
-----------------------------------------
default actif yes

Revision history for this message
Benjamin Saller (bcsaller) wrote :

Looks like a localization issue in the parse

On Thu, Oct 13, 2011 at 12:24 PM, Beber <email address hidden> wrote:
> Here is the output of the "virsh net-list --all" command just after installing all the dependencies :
> toto@oneiric-server:~$ virsh net-list --all
> Nom                  État      Démarrage automatique
> -----------------------------------------
> default              actif      yes
>
> --
> You received this bug notification because you are a member of juju
> hackers, which is the registrant for juju.
> https://bugs.launchpad.net/bugs/873335
>
> Title:
>  "network is already active" error when bootstraping with the local
>  provider
>
> Status in juju:
>  New
>
> Bug description:
>  I'm using Ubuntu 11.10 beta 2 with juju version
>  0.5+bzr402-1juju1~oneiric1 (from the PPA) in a VirtualBox VM.
>
>  Here are the commands I used after installing Ubuntu :
>  sudo su -
>  apt-get update
>  apt-get install openssh-server python-software-properties
>  add-apt-repository ppa:juju/pkgs
>  apt-get update
>  apt-get install juju apt-cacher-ng libvirt-bin libzookeeper-java lxc zookeeper
>  ssh-keygen -t rsa -b 2048
>
>  cat /root/.juju/environments.yaml
>  environments:
>    sample:
>      type: local
>      data-dir: /root/local_dev
>      admin-secret: password
>      default-series: oneiric
>
>  juju --verbose bootstrap
>
>  The bootstrap command fails with the following error :
>  2011-10-13 12:23:40,044 INFO Starting networking...
>  erreur : Impossible de démarrer le réseau default
>  erreur : Requested operation is not valid: network is already active
>
>  After issuing the following command, the bootstraping works fine :
>  virsh net-destroy default
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/873335/+subscriptions
>

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

hmm.. we need to audit all cli/subprocess output parsing for localization awareness.

Changed in juju:
milestone: none → florence
status: New → Confirmed
Revision history for this message
Beber (bertrand-goareguer) wrote :

There is no need to adapat parsing for each locale. Instead, it is possible to copy the current environment variables, change the LC_ALL value to "C" and start a subprocess with the modified environement variables (see attachment for a complete example).

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Excerpts from Beber's message of Sat Oct 15 14:21:51 UTC 2011:
> There is no need to adapat parsing for each locale. Instead, it is
> possible to copy the current environment variables, change the LC_ALL
> value to "C" and start a subprocess with the modified environement
> variables (see attachment for a complete example).
>
> ** Attachment added: "unlocalized_subprocess.py"
> https://bugs.launchpad.net/juju/+bug/873335/+attachment/2547294/+files/unlocalized_subprocess.py
>

SWEET! thanks

Changed in juju:
assignee: nobody → Kapil Thangavelu (hazmat)
status: Confirmed → In Progress
Changed in juju (Ubuntu Oneiric):
assignee: nobody → Kapil Thangavelu (hazmat)
milestone: none → florence
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in juju (Ubuntu):
status: New → Confirmed
Changed in juju:
status: In Progress → Fix Released
Revision history for this message
Matteo Giachino (matteog) wrote :

the problem is in localization....in this file:
/usr/lib/python2.7/dist-packages/juju/providers/local/network.py

where it does:
name, state, auto = line.split()

but...the output to parse is (in italian):
default non attivo yes

where inactive is two words...so it says:
name, state, auto = line.split()
exceptions.ValueError: too many values to unpack

When this will be fixed?

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Excerpts from matteosister's message of Sat Oct 29 08:31:59 UTC 2011:
> the problem is in localization....in this file:
> /usr/lib/python2.7/dist-packages/juju/providers/local/network.py
>
> where it does:
> name, state, auto = line.split()
>
> but...the output to parse is (in italian):
> default non attivo yes
>
> where inactive is two words...so it says:
> name, state, auto = line.split()
> exceptions.ValueError: too many values to unpack
>
> When this will be fixed?
>

The fix for this is in the ppa and on trunk, as for an SRU update of the
version in oneiric, i'm not sure but i would guess by the end of november.

cheers,
Kapil

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Fixed in r411, precise has r424

Changed in juju (Ubuntu):
status: Confirmed → Fix Released
Changed in juju (Ubuntu Oneiric):
status: In Progress → Triaged
assignee: Kapil Thangavelu (hazmat) → nobody
importance: Undecided → Medium
Changed in juju (Ubuntu Oneiric):
milestone: florence → none
Revision history for this message
Rolf Leggewie (r0lf) wrote :

oneiric has seen the end of its life and is no longer receiving any updates. Marking the oneiric task for this ticket as "Won't Fix".

Changed in juju (Ubuntu Oneiric):
status: Triaged → Won't Fix
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.