Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Adding Ubuntu 16.04 #545

Merged
merged 3 commits into from
Apr 25, 2016
Merged

WIP: Adding Ubuntu 16.04 #545

merged 3 commits into from
Apr 25, 2016

Conversation

cheeseplus
Copy link
Contributor

Adding Ubuntu Xenial (16.04) builds using daily images until released. Verified these build at least.

"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, that's a lot of BS....heyyyoooo!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, still broken in 16.04 facepalm

@rmoriz
Copy link
Contributor

rmoriz commented Mar 29, 2016

VMware: image building works with latest packer release, however the imported box fails to start networking because of dhclient binding to a wrong/non existant network interface ens33 (corrent: ens32).

tested with today's daily server build (x64).

Mar 29 13:03:02 vagrant systemd[1]: Started LSB: VMware Tools thinprint.
Mar 29 13:03:04 vagrant dhclient[742]: Internet Systems Consortium DHCP Client 4.3.3
Mar 29 13:03:04 vagrant ifup[692]: Internet Systems Consortium DHCP Client 4.3.3
Mar 29 13:03:04 vagrant dhclient[742]: Copyright 2004-2015 Internet Systems Consortium.
Mar 29 13:03:04 vagrant ifup[692]: Copyright 2004-2015 Internet Systems Consortium.
Mar 29 13:03:04 vagrant dhclient[742]: All rights reserved.
Mar 29 13:03:04 vagrant ifup[692]: All rights reserved.
Mar 29 13:03:04 vagrant dhclient[742]: For info, please visit https://www.isc.org/software/dhcp/
Mar 29 13:03:04 vagrant ifup[692]: For info, please visit https://www.isc.org/software/dhcp/
Mar 29 13:03:04 vagrant dhclient[742]: 
Mar 29 13:03:04 vagrant ifup[692]: Cannot find device "ens33"
Mar 29 13:03:04 vagrant dhclient[742]: Error getting hardware address for "ens33": No such device
Mar 29 13:03:04 vagrant ifup[692]: Error getting hardware address for "ens33": No such device
Mar 29 13:03:04 vagrant dhclient[742]: 
Mar 29 13:03:04 vagrant dhclient[742]: If you think you have received this message due to a bug rather
Mar 29 13:03:04 vagrant ifup[692]: If you think you have received this message due to a bug rather
Mar 29 13:03:04 vagrant dhclient[742]: than a configuration issue please read the section on submitting
Mar 29 13:03:04 vagrant ifup[692]: than a configuration issue please read the section on submitting
Mar 29 13:03:04 vagrant dhclient[742]: bugs on either our web page at www.isc.org or in the README file
Mar 29 13:03:04 vagrant ifup[692]: bugs on either our web page at www.isc.org or in the README file
Mar 29 13:03:04 vagrant dhclient[742]: before submitting a bug.  These pages explain the proper
Mar 29 13:03:04 vagrant ifup[692]: before submitting a bug.  These pages explain the proper
Mar 29 13:03:04 vagrant dhclient[742]: process and the information we find helpful for debugging..
Mar 29 13:03:04 vagrant ifup[692]: process and the information we find helpful for debugging..
Mar 29 13:03:04 vagrant dhclient[742]: 
Mar 29 13:03:04 vagrant dhclient[742]: exiting.
Mar 29 13:03:04 vagrant ifup[692]: exiting.
Mar 29 13:03:04 vagrant ifup[692]: Failed to bring up ens33.
Mar 29 13:03:04 vagrant systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Mar 29 13:03:04 vagrant systemd[1]: Failed to start Raise network interfaces.
Mar 29 13:03:04 vagrant systemd[1]: networking.service: Unit entered failed state.
Mar 29 13:03:04 vagrant systemd[1]: networking.service: Failed with result 'exit-code'.

@cheeseplus
Copy link
Contributor Author

Is this a bug with 16.04 or something we need to work around?

@rmoriz
Copy link
Contributor

rmoriz commented Mar 29, 2016

Good question. Initial setup configures the interfaces as ens33 however when imported to vagrant and used by test-kitchen the device is called ens32. Because the ens33 device doesn't exist, systemd fails the networking services (with dhcp) and the VM is not reachable from test-kitchen.

It's clearly not working at this stage.

I've also tried several kernel combos of "biosdevname" and "net.ifnames" boot arg options but without success. The only working hack for me is to run set -i on the /etc/network/interface file (which I've added to my local scripts/ubuntu/networking.sh) to replace the interface name.

I'm not sure what causes the issue. Ubuntu, VMware Tools, packer/vagrant… I've no idea at this stage.

@rmoriz
Copy link
Contributor

rmoriz commented Mar 29, 2016

by the way, exactly same with Ubuntu 15.10 on VMware Fusion 8.1 and Packer 0.10.0

@cheeseplus
Copy link
Contributor Author

Hrm, I'll try to confirm but I don't recall seeing the same thing - it sounds like it could still be related to https://gist.github.com/brbsix/b70413dec907906ef659 but in my testing that problem seemed to disappear.

@rmoriz
Copy link
Contributor

rmoriz commented Mar 29, 2016

In my case the scheme is consistent (ens##) but the hotplug slot number is off-by-one

Source of slot number "33" probably: https://github.com/mitchellh/packer/blob/master/builder/vmware/iso/step_create_vmx.go#L181

@rmoriz
Copy link
Contributor

rmoriz commented Mar 29, 2016

related: hashicorp/vagrant#4590

@rmoriz
Copy link
Contributor

rmoriz commented Mar 29, 2016

Overwriting the "build-time" pci slot for the ethernet interface to '32' with:

diff --git i/ubuntu-16.04-amd64.json w/ubuntu-16.04-amd64.json
index 3251c0b..90f157c 100644
--- i/ubuntu-16.04-amd64.json
+++ w/ubuntu-16.04-amd64.json
@@ -108,7 +108,8 @@
       "vmx_data": {
         "cpuid.coresPerSocket": "1",
+        "ethernet0.pciSlotNumber": "32",
         "memsize": "384",
         "numvcpus": "1"
       }

allowed me to build, import and run the 16.04 image with test-kitchen and working default networking.

vagrant@default-ubuntu-1604:~$ udevadm info -e |grep ens
P: /devices/pci0000:00/0000:00:11.0/0000:02:00.0/net/ens32
E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:00.0/net/ens32
E: ID_NET_NAME_SLOT=ens32
E: INTERFACE=ens32
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/ens32

15.10 and beyond with its new systemd infrastructure introduce a hell of new aspects to ubuntu-based systems. While this solution depends on a consistent VMWare behaviour, it doesn't require a modification to the distro or Vagrant. It would be awesome if other VMWare users (Fusion, Workstation and different versions) can verify this. I'm also pretty sure this will fix the 15.10 issue.

@rmoriz
Copy link
Contributor

rmoriz commented Mar 31, 2016

If this build-time solution is not sufficient or breaks compatibility, we'll need at least some kitchen-vagrant code to set the hotswap port ID in the generated Vagrantfile

@repeatedly
Copy link

Any progress on this?

@cheeseplus
Copy link
Contributor Author

@repeatedly are you asking about 16.04 boxes or fixing 15.10 vmware driver issues?

@repeatedly
Copy link

@cheeseplus Ubuntu 16.04 boxes.

@cheeseplus
Copy link
Contributor Author

cheeseplus commented Apr 14, 2016

@repeatedly 16.04 is not out yet ;)

Official release date is April 21 fwiw

@repeatedly
Copy link

@cheeseplus Ahhh, Thx.

@Maks3w
Copy link
Contributor

Maks3w commented Apr 21, 2016

16.04 has been released right now

@jjasghar
Copy link

Yep! Let's give the bento team a day or two to validate things. 🤘

@geerlingguy
Copy link

geerlingguy commented Apr 21, 2016

One note - using config very similar to what's in this PR, when I try starting the VM with Vagrant/VirtualBox, I get the following error with 16.04:

==> ubuntu1604: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifdown eth1 2> /dev/null

Stdout from the command:



Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device

(Similar to the problem mentioned with 15.10 earlier in this thread).

@rickard-von-essen
Copy link
Collaborator

@geerlingguy That is probably related to hashicorp/vagrant@0505771

@geerlingguy
Copy link

@rickard-von-essen - partly; see geerlingguy/packer-boxes#1 (comment) for the two parts that fail when using private networking. There's an open PR to fix the interface naming support.

@kenhys
Copy link
Contributor

kenhys commented Apr 22, 2016

This PR and the following patch works for me.
(I'm using virtualbox, not vmware provider)

From 957ae5c62b3a70667340841242bcc4b604775c04 Mon Sep 17 00:00:00 2001
From: HAYASHI Kentaro <kenhys@gmail.com>
Date: Fri, 22 Apr 2016 23:13:21 +0900
Subject: [PATCH] Update to Ubuntu 16.04 LTS

Signed-off-by: HAYASHI Kentaro <kenhys@gmail.com>
---
 http/ubuntu-16.04/preseed.cfg | 31 +++++++++++++++++++++++++++++++
 ubuntu-16.04-amd64.json       | 10 +++++-----
 ubuntu-16.04-i386.json        | 10 +++++-----
 3 files changed, 41 insertions(+), 10 deletions(-)
 create mode 100644 http/ubuntu-16.04/preseed.cfg

diff --git a/http/ubuntu-16.04/preseed.cfg b/http/ubuntu-16.04/preseed.cfg
new file mode 100644
index 0000000..5720155
--- /dev/null
+++ b/http/ubuntu-16.04/preseed.cfg
@@ -0,0 +1,31 @@
+choose-mirror-bin mirror/http/proxy string
+d-i base-installer/kernel/override-image string linux-server
+d-i clock-setup/utc boolean true
+d-i clock-setup/utc-auto boolean true
+d-i finish-install/reboot_in_progress note
+d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+d-i partman-auto-lvm/guided_size string max
+d-i partman-auto/choose_recipe select atomic
+d-i partman-auto/method string lvm
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+d-i partman-lvm/device_remove_lvm boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman/confirm_write_new_label boolean true
+d-i passwd/user-fullname string vagrant
+d-i passwd/user-uid string 900
+d-i passwd/user-password password vagrant
+d-i passwd/user-password-again password vagrant
+d-i passwd/username string vagrant
+d-i pkgsel/include string openssh-server cryptsetup build-essential libssl-dev libreadline-dev zlib1g-dev linux-source dkms nfs-common linux-headers-$(uname -r) perl
+d-i pkgsel/install-language-support boolean false
+d-i pkgsel/update-policy select unattended-upgrades
+d-i pkgsel/upgrade select full-upgrade
+d-i time/zone string UTC
+d-i user-setup/allow-password-weak boolean true
+d-i user-setup/encrypt-home boolean false
+tasksel tasksel/first multiselect standard, ubuntu-server
diff --git a/ubuntu-16.04-amd64.json b/ubuntu-16.04-amd64.json
index 3251c0b..c9ee8f9 100644
--- a/ubuntu-16.04-amd64.json
+++ b/ubuntu-16.04-amd64.json
@@ -254,15 +254,15 @@
     "headless": "",
     "http_proxy": "{{env `http_proxy`}}",
     "https_proxy": "{{env `https_proxy`}}",
-    "iso_checksum": "079763f6d613d1cc4e8facd5a2ef119f5c523b38d9c78f35a9e0d2ac64ccb7cf",
+    "iso_checksum": "b8b172cbdf04f5ff8adc8c2c1b4007ccf66f00fc6a324a6da6eba67de71746f6",
     "iso_checksum_type": "sha256",
-    "iso_name": "xenial-server-amd64.iso",
+    "iso_name": "ubuntu-16.04-server-amd64.iso",
     "metadata": "floppy/dummy_metadata.json",
-    "mirror": "http://cdimage.ubuntu.com/ubuntu-server/daily",
-    "mirror_directory": "current",
+    "mirror": "http://releases.ubuntu.com/xenial",
+    "mirror_directory": "",
     "name": "ubuntu-16.04",
     "no_proxy": "{{env `no_proxy`}}",
-    "preseed_path": "ubuntu-15.10/preseed.cfg",
+    "preseed_path": "ubuntu-16.04/preseed.cfg",
     "template": "ubuntu-16.04-amd64",
     "version": "2.1.TIMESTAMP"
   }
diff --git a/ubuntu-16.04-i386.json b/ubuntu-16.04-i386.json
index 9b801b4..ac9a5fb 100644
--- a/ubuntu-16.04-i386.json
+++ b/ubuntu-16.04-i386.json
@@ -254,15 +254,15 @@
     "headless": "",
     "http_proxy": "{{env `http_proxy`}}",
     "https_proxy": "{{env `https_proxy`}}",
-    "iso_checksum": "fa71252c2364bd851b978bee196489dfc6fbaa4873c489cc592016e256df8445",
+    "iso_checksum": "8d52f3127f2b7ffa97698913b722e3219187476a9b936055d737f3e00aecd24d",
     "iso_checksum_type": "sha256",
-    "iso_name": "xenial-server-i386.iso",
+    "iso_name": "ubuntu-16.04-server-i386.iso",
     "metadata": "floppy/dummy_metadata.json",
-    "mirror": "http://cdimage.ubuntu.com/ubuntu-server/daily",
-    "mirror_directory": "current",
+    "mirror": "http://releases.ubuntu.com/xenial",
+    "mirror_directory": "",
     "name": "ubuntu-16.04-i386",
     "no_proxy": "{{env `no_proxy`}}",
-    "preseed_path": "ubuntu-15.10/preseed.cfg",
+    "preseed_path": "ubuntu-16.04/preseed.cfg",
     "template": "ubuntu-16.04-i386",
     "version": "2.1.TIMESTAMP"
   }
-- 
2.8.1

@rmoriz
Copy link
Contributor

rmoriz commented Apr 22, 2016

@geerlingguy that eth#-schema is outdated, see my comments above and 284f214

@geerlingguy
Copy link

geerlingguy commented Apr 22, 2016

@rmoriz - ah, so adding "ethernet0.pciSlotNumber": "32", is a simpler/easier workaround for the first issue, for now (the consistent interface naming)? I haven't tested that.

For the second (ifdown bailing out), that commit (hashicorp/vagrant@0505771) fixes the problem, but it's not available in a Vagrant release yet (when, oh when, will 1.8.2 come out with that fix and a bajillion others I'm waiting on??).

@rmoriz
Copy link
Contributor

rmoriz commented Apr 22, 2016

@geerlingguy never had that ifdown thing and I guess nobody except you is having this problem in this PR comments…

@moonglum
Copy link

Amazing :) When will this appear here? https://atlas.hashicorp.com/bento

@cheeseplus
Copy link
Contributor Author

cheeseplus commented Apr 28, 2016

@moonglum

The pipeline is building/publishing now and ubuntu-1604 is near the end - we've got 35 builds left out of 64. That said the 16.04 builds all seem have driver or shared folder issues as well as potential vagrant issues.

@cheeseplus
Copy link
Contributor Author

@geerlingguy I applied the patch from hashicorp/vagrant@0505771 to my local vagrant installation and it seems to work with the bento boxes I'm in the process of releasing now.

@geerlingguy
Copy link

@cheeseplus - Here's to a 1.8.2 Vagrant release someday :)

@Vrtak-CZ
Copy link

Chef 12.7.2

Compiling Cookbooks...
       Converging 27 resources
       Recipe: cron::default
         * apt_package[cron] action install
           - install version 3.0pl1-128ubuntu2 of package cron
         * service[cron] action enable

           ================================================================================
           Error executing action `enable` on resource 'service[cron]'
           ================================================================================

           Errno::ENOENT
           -------------
           No such file or directory - /sbin/status

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/cron/recipes/default.rb

            24: service 'cron' do
            25:   service_name node['cron']['service_name'] unless node['cron']['service_name'].nil?
            26:   action [:enable, :start]
            27: end
            28: 

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/cron/recipes/default.rb:24:in `from_file'

           service("cron") do
             action [:enable, :start]
             supports {:restart=>nil, :reload=>nil, :status=>nil}
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             service_name "cron"
             pattern "cron"
             declared_type :service
             cookbook_name "cron"
             recipe_name "default"
           end

       Running handlers:
       [2016-04-29T12:01:37+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2016-04-29T12:01:37+00:00] ERROR: Exception handlers complete
       Chef Client failed. 1 resources updated in 05 seconds
       [2016-04-29T12:01:37+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2016-04-29T12:01:37+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2016-04-29T12:01:37+00:00] ERROR: service[cron] (cron::default line 24) had an error: Errno::ENOENT: No such file or directory - /sbin/status
       [2016-04-29T12:01:38+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

@rmoriz
Copy link
Contributor

rmoriz commented Apr 29, 2016

@Vrtak-CZ wrong place, unrelated issue, no comments, bad style :(

@sethvargo sethvargo deleted the ubuntu-16.04 branch April 29, 2016 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.