Package xcp-xapi prompts for network backend but always picks Open vSwitch

Bug #1176256 reported by jimp
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xen-api (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am installing XCP on a fresh installation of Ubuntu Server (64-bit) 12.04 with the latest updates applied with apt-get update && apt-get upgrade.

Following this guide... https://help.ubuntu.com/community/Setting%20up%20Xen%20and%20XAPI%20(XenAPI)%20on%20Ubuntu%20Server%2012.04%20LTS%20and%20Managing%20it%20With%20Citrix%20XenCenter%20or%20OpenXenManager#During_Installation_of_Ubuntu

It instructs:
Installing and configuring XAPI (XenAPI)
  Install XCP-XAPI
    sudo apt-get install xcp-xapi
      -> Choose "bridge" when prompted for network backend

If I pick Open vSwitch, it fails to properly configure it and then it is stuck in a loop reporting this error:
May 03 19:55:27|00423|stream_unix|ERR|/tmp/stream-unix.7291.211: connection to /var/run/openvswitch/db.sock failed: No such file or directory
May 03 19:55:27|00424|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)

On my second attempt (I started over from scratch), I realized I didn't read the line following the command for choosing "bridge." I selected bridge, but the package still installed Open vSwitch instead.

I found a post from a Debian package maintainer claiming he fixed this in Debian Wheezy/SID.

http://www.gossamer-threads.com/lists/xen/api/251320#251320
"Note that I closed an issue in Wheezy/SID about openvswitch being always selected even if you choose bridging (it was missing a $1 = configure test). So you might want to use the latest version available in Debian."

Has that fix not made it into Ubuntu 12.04? Will it? I'm not sure how to get around this error.

Revision history for this message
jimp (jimmy-basicmatrix) wrote :

Added xcp-xapi Ubuntu package target.

affects: xen (Ubuntu) → xen-api (Ubuntu)
Revision history for this message
jimp (jimmy-basicmatrix) wrote :

I found xen-xapi package version 1.3.2-11ubuntu1 includes this fix (received from upstream Debian?) in v1.3.2-9: http://changelogs.ubuntu.com/changelogs/pool/universe/x/xen-api/xen-api_1.3.2-11ubuntu1/changelog

xen-api (1.3.2-9) unstable; urgency=low
* Checks if $1 = configure in debian/xcp-networkd.postinst, which as a side
  effect is also repairing debconf choice (openvswitch was used no mater what).

Since Ubuntu 12.04 is a LTS release, shouldn't that fix be made available to its repositories as well? As it stands, it's impossible to install XCP in 12.04 since that installer bug appeared.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi,

Indeed, this was fixed a long time ago in Debian, and this bug should be cleared once 1.3.2-9 migrates to Ubuntu. I would suggest to also update Precise with the latest patch release available in Wheezy.

By the way, I don't agree that "it's impossible to install XCP in 12.04 since that installer bug appeared". Sure, this bug was annoying, but that didn't render the package completely unusable.

Thomas (maintainer of XCP in Debian)

Revision history for this message
jimp (jimmy-basicmatrix) wrote :

Hi Thomas,

Thank you for the feedback.

I might have misspoken, but my claim of it being "impossible to install" is because after the installer proceeds to install openvswitch it falls into an infinite loop that will not break.

May 03 19:55:27|00423|stream_unix|ERR|/tmp/stream-unix.7291.211: connection to /var/run/openvswitch/db.sock failed: No such file or directory
May 03 19:55:27|00424|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
...(Repeats forever, every 8 seconds. Ctrl+C won't break it.)

It appears that is an issue with openvswitch in Ubuntu and not XCP, but I also cannot successfully install XCP over the unsuccessful dependency. If openvswitch installs fine in Debian, then I agree it's only an annoyance. I did not mean to imply the upstream package was broken, on the contrary it looks like it got fixed very quickly.

I am going to try installing the original Precise xcp-xapi package now and "apt-get upgrade" from there. I'll report back.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Well, one could edit the configuration file just right after the package is installed, and then the installation would be successful, no?

I'm sorry, I don't test my XCP packages on Ubuntu, so I can't really tell, and that's the first time I hear about this loop. Is the above from the xcp-xapi.log file?

Thomas

Revision history for this message
jimp (jimmy-basicmatrix) wrote :

The installation actually never finishes, but otherwise editing the config afterward would be a fine.

I couldn't install the older version (original 12.04) because of dependency challenges.

I have tried again, but this time I installed openvswitch by itself. It errors out due to missing kernel headers. I added the missing headers and then openvswitch installed successfully. But as a dependency of the xcp-xapi package, it proceeds onward with the installation as if openvswitch was setup correctly. That's where it (or another dependent package?) gets stuck waiting on openvswitch to start. As long as I meet the openvswitch kernel header dependency before installing xcp-xapi, the installation succeeds.

I made the "openvswitch" => "bridge" change post install. The server is working fine.

It would be good if the xcp-xapi package errored out properly in the case openvswitch is not available, otherwise the xcp-xapi package is not at fault. Thanks for the help.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi,

Indeed, I never had such a problem as the package never finishing to install. I'm surprised that Ubuntu cared so few about it that it never got reported.

Anyway, let's not discuss the patch, and let's have the package updated... :)

Thomas

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xen-api (Ubuntu):
status: New → Confirmed
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.