Giter Site home page Giter Site logo

sig-cloud-instance-build's Introduction

Build-Instance

This git repo contains kickstart files that define how the various CentOS Cloud Instances are built. These kickstarts are parsed with virt-install. Every kickstart must be named in the following convention:

CentOS-<release ver>-<arch>-<target>-<tag>.ks

eg:

CentOS-6-x86_64-OpenStack-6.5_20140119.ks

Along with every kickstart is a metadata file, with the same name as the kickstart, except ending with .json ( because they are json files )

Git Tags:

As a part of the instance release process, the content used to build that instance MUST be tag'd away

Notes:

  • ReleaseVer must always only be 5 or 6 or 7, never the point release ( but you can overload the TAG component in the name with anything, I like using the point release there, along with the datestamp ).

ToDo:

  • Provide some example kickstarts
  • Provide some example metadata json's
  • Import the virt-install wrapper bash script

sig-cloud-instance-build's People

Contributors

am11 avatar arrfab avatar bobidle avatar ericcurtin avatar farosas avatar habbie avatar hughesjr avatar jefby avatar jperrin avatar kbsingh avatar kintoandar avatar lalatendumohanty avatar lpancescu avatar mattymo avatar mmckinst avatar mvermaes avatar remy-tiitre avatar robertdebock avatar sandrobonazzola avatar sebgoa avatar shoop avatar siddharthvipul avatar sikevux avatar soul9 avatar stpierre avatar szarkos avatar thmo avatar tjanez avatar utnehmer avatar zoidyzoidzoid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sig-cloud-instance-build's Issues

Get vbox additions pre-installed

The vagrant centos7 image currently lacks VBox guest additions. This leads to a lot of unnecessary Net I/O consuming time and mirror bandwidth on each initial vagrant up.

To be able to get them in, the following is necessary:

  1. Include VBox guest additions dependencies in centos7.ks
  2. Package VBox Guest additions as RPM, not entirely unlike the way FreeBSD does (http://www.freshports.org/emulators/virtualbox-ose-additions) but different ;-)
  3. Get that RPM hosted on the community build service
  4. Include it in centos7.ks

The Opensource variant of the Guest additions is licensed under the GPLv2 license, so this would not cause any conflict with any other components.

Operationalizing the steps above I'm looking at:

  1. Identify dependencies
    Vagrant's plugin vbguest installs them all during the first vagrant up, so this is about using a minimal Vagrantfile to vagrant up, log its output, and extract all yum-dependencies.
    I'll follow up in a comment next week at the latest.
  2. Package VBox Guest additions as RPM & Getting it hosted on CBS
    Someone familiar with RPM builds and the community build service would need to help me with this to include any patches (if necessary), configure build and install steps to make things build on CentOS. Once we have something that builds we should be able to publish it easily.

X-ref: #27 (comment)

Instructions on verifying the integrity of Vagrant images on the CentOS blog are misleading

(I'm reporting this here since I don't know if it is possible to adequately format such a long WordPress comment.)

The (currently latest) blog post on the release of CentOS Vagrant Images version 1801.02 instructs the user to first download and verify the SHA256 checksums of the images:

$ curl http://cloud.centos.org/centos/7/vagrant/x86_64/images/sha256sum.txt.asc -o sha256sum.txt.asc
$ gpg --verify sha256sum.txt.asc

If the check passed, the user is instructed to use the appropriate checksum to check the downloaded Vagrant image.

Issue

As Vagrant's vagrant box add --help says:

Usage: vagrant box add [options] <name, url, or path>

... trimmed ...

The options below only apply if you're adding a box file directly,
and not using a Vagrant server or a box structured like 'user/box':

        --checksum CHECKSUM          Checksum for the box
        --checksum-type TYPE         Checksum type (md5, sha1, sha256)
        --name BOX                   Name of the box
    -h, --help                       Print this help

an image's checksum is only checked if a box is added directly.

The command given in the blog post would not report a checksum error, even if it is clearly wrong (e.g. if we specify the checksum to be deadbeef):

$ vagrant box add --checksum-type sha256 --checksum deadbeef --provider libvirt --box-version 1801.02 centos/7
==> box: Loading metadata for box 'centos/7'
    box: URL: https://vagrantcloud.com/centos/7
==> box: Adding box 'centos/7' (v1801.02) for provider: libvirt
    box: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1801.02/providers/libvirt.box
==> box: Successfully added box 'centos/7' (v1801.02) for 'libvirt'!

Expected results

We can add a Vagrant box manually and check if the checksum is verified:

$ vagrant box add --checksum-type sha256 --checksum deadbeef --provider libvirt --name centos/7 https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1801_02.Libvirt.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'centos/7' (v0) for provider: libvirt
    box: Downloading: https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1801_02.Libvirt.box
    box: Calculating and comparing box checksum...
The checksum of the downloaded box did not match the expected
value. Please verify that you have the proper URL setup and that
you're downloading the proper file.

Expected: deadbeef
Received: 4440a10744855ec2819d726074958ad6cff56bb5a616f6a45b0a42d602aa1154

Adding the box manually actually verified the passed checksum (deadbeef) and didn't add the box to Vagrant.

Solution

Adding a box directly as it was described above does not allow one to specify a box's version by passing the --box-name parameter.

A simple solution is to construct a box's JSON metadata file with the following command:

$ cat << EOF > centos7.json
> {
>   "name": "centos/7",
>   "versions": [
>     {
>       "version": "1801.02",
>       "providers": [
>         {
>           "name": "libvirt",
>           "url": "https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1801_02.Libvirt.box",
>           "checksum_type": "sha256",
>           "checksum": "4440a10744855ec2819d726074958ad6cff56bb5a616f6a45b0a42d602aa1154"
>         }
>       ]
>     }
>   ]
> }
> EOF

This metadata allows one to specify a box's version and also pass the checksum type and value to be veriified.

And it works as expected:

$ vagrant box add centos7.json
==> box: Loading metadata for box 'centos7.json'
    box: URL: file:///home/tadej/centos7.json
==> box: Adding box 'centos/7' (v1801.02) for provider: libvirt
    box: Downloading: https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1801_02.Libvirt.box
    box: Calculating and comparing box checksum...
==> box: Successfully added box 'centos/7' (v1801.02) for 'libvirt'!

Licence file is missing

Can someone let me know what kind of licence we have for this project? Currently I don't see any LICENCE file in it. It will be grate if we create one. -Thanks.

docker container creation issues with selinux

After building the image with containerbuild.sh and importing the image into docker, I need to restorecon -R /var/lib/docker/ for the image to work, otherwise some directories (like /root and /var/lib/yum) are inaccessible.

Before running restorecon:

# docker run -it centos /bin/bash
bash: /root/.bashrc: Permission denied
bash-4.2#

After running restorecon:

docker run -it centos /bin/bash
[root@3857b5bc319a /]#

vmware-esxi "Failed, timeout waiting for "running"."

vagrant up fails when using vmware-esxi plugin.

The error is caused because the plugin is waiting for the VM state to change to running which it never does because there are no VMware tools in the image.

I logged into the image via ESXi console and installed and started open-vm-tools, after this has been done vagrant successfully provisions the new VM.

I can test this with VMware workstation when I get to work tomorrow, but I can't test Fusion or vCenter however I expect they will all behave the same.

vagrant@vmtest01:~/vmmgt01$ vagrant up --provider=vmware_esxi

Bringing machine 'vmmgt01' up with 'vmware_esxi' provider...
==> vmmgt01: Virtual Machine will be built.
VMware ovftool 4.3.0 (build-7948156)
==> vmmgt01: ---   --- ESXi Summary ---
==> vmmgt01: --- ESXi host       : X.X.X.X
==> vmmgt01: --- Virtual Network : ["LAN"]
==> vmmgt01: --- Disk Store      : datastore1
==> vmmgt01: --- Resource Pool   : /
==> vmmgt01: ---  --- Guest Summary ---
==> vmmgt01: --- VM Name         : vmmgt01
==> vmmgt01: --- Box             : centos/7
==> vmmgt01: --- Box Ver         : 1804.02
==> vmmgt01: --- Memsize (MB)    : 4096
==> vmmgt01: --- CPUS            : 2
==> vmmgt01: --- Guest OS type   : linux
==> vmmgt01: ---   --- Guest Build ---
Opening VMX source: /home/vagrant/.vagrant.d/boxes/centos-VAGRANTSLASH-7/1804.02/vmware_desktop/ZZZZ_vmmgt01.vmx
Opening VI target: vi://[email protected]:443/
Deploying to VI: vi://[email protected]:443/
Transfer Completed                    
Completed successfully
==> vmmgt01: --- VMID            : 48
==> vmmgt01: --- VM has been Powered On...
==> vmmgt01: --- Waiting for state "running"
There was an error.
  Failed, timeout waiting for "running".

Update:
I wrote a quick script to check if the server is running in VMware if yes then install and start open-vm-tools, perhaps this could be added to the image on first boot? or as a @reboot cron job that deletes itself after the first run?

#!/bin/bash
if dmidecode -s system-product-name | grep --quiet -i vmware; then
  yum install -y open-vm-tools
  systemctl enable vmtoolsd.service
  systemctl start vmtoolsd.service
fi

Potentially stale network config in the image

The network doesn't come up reliably (using Vagrant with VirtualBox on OS X, configured with private_network, which means Vagrant will generate a VM with two NICs). NetworkManager seems to sometimes associate interface eth0 with device eth1, causing dhclient to try to get an address on eth1, where ther's no DHCP server. However, I still see a /etc/resolv.conf:

[vagrant@localhost ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.122.1

However, 192.168.122.1 doesn't make any sense: the VirtualBox NAT uses 10.0.2.0/24, while the second NIC is on the host-only network 192.168.56.0/24. I suspect /etc/resolv.conf might be part of the generated image:

[vagrant@localhost ~]$ ls -l /etc/resolv.conf
-rw-r--r--. 1 root 55 Feb 22 12:48 /etc/resolv.conf
[vagrant@localhost ~]$ date
Tue 23 12:36:34 EST 2016
[vagrant@localhost ~]$ uptime
12:36:38 up 14 min,  1 user,  load average: 0.00, 0.16, 0.24

I also see an /etc/sysconfig/network-scripts/ifcfg-eth0 file, also from Feb 22, probably part of the image. It didn't have any DEVICE line, just NAME="eth0", so I added DEVICE="eth0" and issued sudo nmcli con reload. Now nmcli -t -f NAME,DEVICE con show displays eth0:eth0, and ip addr show eth0 displays the IP address 10.0.2.15/24: the network is working properly now.

no MAKEDEV

Hello, i want to build an centos docker image for aarch64,but when i run command

ami-creator -c centos-7.1.1503-arm64.ks

the centos-7.1.1503-arm64.ks is the copy of centos-7.1.1503.ks,and now it just prints some error ,like can't find MAKEDEV .

in centos7 ,there are no package MAKEDEV,so what is the equal package ?

Thanks very much.

[BUG REPORT] KeyboardInterrupt error of "yum update"

[BUG REPORT]

cat /etc/redhat-release

CentOS Linux release 7.0.1406 (Core)

uname -a

Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

yum update

...
Total download size: 594 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
updates/7/x86_64/prestodelta | 240 kB 00:41
Delta RPMs reduced 35 M of updates to 3.1 M (91% saved)
(1/566): flac-libs-1.3.0-4.el7_1.3.0-5.el7_1.x86_64.drpm | 27 kB 00:02
(2/566): freetype-2.4.11-9.el7_2.4.11-10.el7_1.1.x86_64.dr | 62 kB 00:05
(3/566): gdk-pixbuf2-2.28.2-4.el7_2.28.2-5.el7_1.x86_64.dr | 75 kB 00:01
(4/566): iputils-20121221-6.el7_20121221-6.el7_1.1.x86_64. | 110 kB 00:00
(5/566): libuser-0.60-5.el7_0.60-7.el7_1.x86_64.drpm | 122 kB 00:00
(6/566): libuser-python-0.60-5.el7_0.60-7.el7_1.x86_64.drp | 35 kB 00:00
(7/566): python-2.7.5-16.el7_2.7.5-18.el7_1.1.x86_64.drpm | 58 kB 00:00
(8/566): python-chardet-2.0.1-7.el7_2.2.1-1.el7_1.noarch.d | 42 kB 00:00
Traceback (most recent call last): ] 108 kB/s | 715 kB 88:26 ETA
File "/usr/libexec/urlgrabber-ext-down", line 75, in
main()
File "/usr/libexec/urlgrabber-ext-down", line 61, in main
fo = PyCurlFileObject(opts.url, opts.filename, opts)
File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1258, in init
self._do_open()
File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1589, in _do_open
self._do_grab()
File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1723, in _do_grab
self._do_perform()
File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1517, in _do_perform
raise KeyboardInterrupt
KeyboardInterrupt
(13/566): python-libs-2.7. 0% [ ] 120 kB/s | 807 kB 80:02 ETA

Exiting on user cancel

Doubt about build of Generic Cloud Images process

Hi,

I am currently running a POC on OpenStack and one of the base images that I intend to use is CentOS 7.
I have started using the Generic Cloud image for this (http://cloud.centos.org/centos/7/images/), but now that the project is getting further in I would like to have "control" over the base images. I have arrived on this project hopping to find the kickstart file used to generate the Cloud images, but it seems that the OpenStack version is a little old (still CentOS 6).

Is this repo the correct one to look for this kind of resource? If not, can I be pointed to the correct project that deals with the build of the generic cloud images?

Thanks in advance.

Anaconda log files and tmp kickstart files are not removed

The kickstart files for the CentOS 7 Docker images contain post commands which should remove "thing we don't need", e.g. the Anaconda log files and temporary kickstart scripts

$ cat docker/centos-7.ks
...
rm -f /tmp/ks-script*
rm -rf /var/log/anaconda
rm -rf /tmp/ks-script*
...

but these files are still part of the CentOS 7 images

$ docker run --rm -it centos:7 find /var/log/anaconda
/var/log/anaconda
/var/log/anaconda/storage.log
/var/log/anaconda/anaconda.log
/var/log/anaconda/packaging.log
/var/log/anaconda/ks-script-sb0l8b.log
/var/log/anaconda/journal.log
/var/log/anaconda/ks-script-2ziUl6.log
/var/log/anaconda/ks-script-hE5IPf.log
/var/log/anaconda/program.log
/var/log/anaconda/ifcfg.log

$ docker run --rm -it centos:7 find /tmp
/tmp
/tmp/.XIM-unix
/tmp/ks-script-hE5IPf
/tmp/yum.log
/tmp/.X11-unix
/tmp/.font-unix
/tmp/.ICE-unix
/tmp/.Test-unix

How to remove these files via the post configuration?

We should have rsync and screen RPM in the vagrant box

Having the rsync package in the Vagrant box helps to start the vagrant box quickly on a Linux host. As for each "vagrant up" on Linux/GNU (with libvirt) Vagrant installs rsync from internet.
Having screen helps a developer environment.

Switch the filesystem of the centos/7 Vagrant image to XFS

Our Vagrant images are currently using Ext4 filesystems. We've had at least one report in #centos-devel about running out of inodes, but not out of space. I propose switching the filesystems used by centos/7 to XFS, which dynamically allocates inodes and is the upstream default filesystem for regular installations. We should probably keep using Ext4 in centos/6, since it's the default filesystem in CentOS Linux 6.

Remove user nproc Limit CentOS 7 Docker image

Hi, there is a default nproc limit for non-root users in the CentOS 7 docker image.

[root@ba4904984f68 /]# cat /etc/security/limits.d/20-nproc.conf 
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     4096
root       soft    nproc     unlimited

[user@ba4904984f68 ~]$ ulimit -a
max user processes              (-u) 4096

When running several containers with Java applications as the same user this limit is hit easily as this limit seems not only be valid for processes but also for threads. Also the limit is not only valid for a single container, it is an overall limit for several containers running the same user.

Could it be useful to remove the file 20-nproc.conf in your provided CentOS 7 image via the kickstart?

Vagrant image intermittently fails to bring up networking

The vagrant box CentOS-7-Vagrant-1508-x86_64-01.box intermittently fails to bring up networking when used in a configuration with more than one network adapter. This is because the 'eth0' connection profile is not associated with any specific interface. When NetworkManager tries to bring the 'eth0' connection up on a non-eth0 device (that is not on a network with a DHCP server), it logs a failure message such as:

network: Bringing up interface eth0: Error: Connection activation failed: Connection 'eth0' is already active on eth1

Box image cannot used under windows

There is no need to create a default synced folder "/vagrant" as explained in pull request #34, because vagrant will do that automatically. As from https://www.vagrantup.com/docs/synced-folders/:

By default, Vagrant will share your project directory (the directory with the Vagrantfile) to /vagrant.

In addition, the box image cannot be used under windows because you set the synced folder type to "rsync" which is not available under windows.

You can simply test it on a existing vagrant vm, if you comment the following line in the box image Vagrantfile, which you can find at "C:\Users[USERNAME].vagrant.d\boxes\centos-VAGRANTSLASH-7\1607.01\virtualbox\Vagrantfile":
Change

config.vm.synced_folder ".", "/vagrant", type: "rsync"
to

config.vm.synced_folder ".", "/vagrant", type: "rsync"

and reboot the vagrant vm using
vagrant reload

After the vagrant vm is up again, just login to the vm via ssh and execute "df":

[vagrant@vagrant-box ~]$ df
Filesystem                                    1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00                38765936   1963532  34810112   6% /
devtmpfs                                         932080         0    932080   0% /dev
tmpfs                                            942020         0    942020   0% /dev/shm
tmpfs                                            942020      8520    933500   1% /run
tmpfs                                            942020         0    942020   0% /sys/fs/cgroup
/dev/sda2                                        487634    211140    246798  47% /boot
vagrant                                       961700860 471403940 490296920  50% /vagrant
tmpfs                                            188408         0    188408   0% /run/user/1000

Add armv7l images / Docker manifests lists

Now that CentOS 7.4 has armv7l support could we get arm32 cloud images? Perhaps also integration with the new Docker manifest support which allows for the correct arch to be pulled when someone does docker pull centos.

include gdb-gdbserver in docker images

RHEL base docker images include the /usr/bin/gdbserver (gdb-gdbserver subrpm), because this enables somewhat straightforward remote debugging of running containers. (gdbserver acts as a remote debugging agent.) Please add this tiny piece into the centos base images too.

sed in Vagrant kickstarts matches extra line

This sed expression in vagrant/centos6.ks and vagrant/centos7.ks:

sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers

matches both:

Defaults    requiretty

as well as the following comment shortly after:

# changed in order to be able to use sudo without a tty. See requiretty above.

Assuming the latter is not desired, #78 is a trivial fix to address this.

autorelabel fails on Vagrant image for VirtualBox

Clone of https://bugs.centos.org/view.php?id=13213 which I put there because I didn't know better, thanks to @lpancescu for the intro to this repo.

We stumbled upon this in rear/rear-workshop-osbconf-2016#4 (comment) and you can use the Vagrantfile in https://gist.github.com/schlomo/b532ba9bca87ea40d922d90e62b7338c as a test case.

@lpancescu The reason to use autorelabel in the VM is that we use this VM to do backup and restore tests so that we actually restore the VM's content into a new VM with the help of https://github.com/rear/rear and then we need to trigger autorelabel to restore the labels upon the first boot.

Vagrant images: regular user accounts can gain administrative privileges

Since the password to the root and vagrant accounts is publicly known, regular user accounts are able to gain administrative privileges by issuing either su - or su - vagrant (the vagrant user has full sudo rights, without requiring a password).

This might surprise beginners creating additional user accounts with useradd; we should probably change our default configuration not to allow that.

Cloud images should be usable also after a new release

When using cloud images (specifically Vagrant/VirtualBox images), older image releases will lack packages in remote repositories, rendering those images useless for some.

A concrete example is image version 1803.01 on the day of writing this ticket. The image ships with kernel-3.10.0-693.11.6, yet kernel-* packages with the corresponding versions are nowhere to be found (like kernel-devel-3.10.0-693.11.6). Those packages are also not in the vault repositories.

An update+reboot can solve the problem, however part of the idea of having a cloud image is to not have to update+reboot it as the first operation.

Vagrant: Multiline in /etc/pam.d/su breaks Augeas

When spinning up a Vagrant CentOS7 box (centos/7) the machine ends up with the following /etc/pam.d/su file:

#%PAM-1.0
auth		sufficient	pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth		sufficient	pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth		required	pam_wheel.so use_uid
auth		substack	system-auth
auth		include		postlogin
account		sufficient	pam_succeed_if.so uid = 0 use_uid quiet
account		[success=1 default=ignore] \
				pam_succeed_if.so user = vagrant use_uid quiet
account		required	pam_succeed_if.so user notin root:vagrant
account		include		system-auth
password	include		system-auth
session		include		system-auth
session		include		postlogin
session		optional	pam_xauth.so

If the content of this file is being manipulated using Augeas, this breaks due to the multiline:

augtool> print /augeas/files/etc/pam.d/su/
/augeas/files/etc/pam.d/su
/augeas/files/etc/pam.d/su/path = "/files/etc/pam.d/su"
/augeas/files/etc/pam.d/su/mtime = "1541598575"
/augeas/files/etc/pam.d/su/lens = "@Pam"
/augeas/files/etc/pam.d/su/lens/info = "/usr/share/augeas/lenses/dist/pam.aug:60.12-.56:"
/augeas/files/etc/pam.d/su/error = "parse_failed"
/augeas/files/etc/pam.d/su/error/pos = "469"
/augeas/files/etc/pam.d/su/error/line = "12"
/augeas/files/etc/pam.d/su/error/char = "5"
/augeas/files/etc/pam.d/su/error/lens = "/usr/share/augeas/lenses/dist/pam.aug:60.12-.56:"
/augeas/files/etc/pam.d/su/error/lens/last_matched = "/usr/share/augeas/lenses/dist/util.aug:134.6-.14:"
/augeas/files/etc/pam.d/su/error/lens/next_not_matched = "/usr/share/augeas/lenses/dist/util.aug:22.27-.34:"
/augeas/files/etc/pam.d/su/error/message = "Iterated lens matched less than it should"

The default lens for PAM does not support this.

In our case we use Augeas within Puppet to handle configuration management.

If there is no real reason to put the multiline there, can this be put on a single line?

Kickstart errors from containerbuild.sh

Issue

When using the kickstart files provided with the containerbuild.sh script I am getting errors like this:

  • centos-6
The following problem occurred on line 35 of the kickstart file:

The --nobase option was removed in version F22, but you are using kickstart syntax version DEVEL.

2016-08-03 11:02:26,703: The kickstart must include shutdown when using virt installation.
  • centos-7
2016-08-03 10:04:25,250: The kickstart must include shutdown when using virt installation.

Tested with centos-6.ks and centos-7.ks on a Fedora 24 system.

Proposed solution:

Removing the --nobase option from the centos-6.ks and changing reboot to shutdown in both files seems to take care of the issue.

We should increase the vagrant image disk size to 40GB

We should increase the vagrant image disk size to 40GB as the disk space is thin provisioned i.e. it will not take space only when data is written on to it. So increasing disk size does not increase the image size but helps users who need more disk size.

can't mount vboxfs because vbguest plugin fails to install vboxadditions

The vbguest plugin fails to install the vboxadditions because can't install the package for the kernel headers
No package kernel-devel-3.10.0-327.el7.x86_64 available.

It started to fail 2 days ago, I guess that we need a base box with the new kernel version 3.10.0-514.2.2.el7

Linux localhost.localdomain 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# yum install kernel-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:3.10.0-514.2.2.el7 will be installed
--> Finished Dependency Resolution```

ldap schema not available inside a container

I'm running into a similar issue than #7, where i need to deploy openldap schemas stored inside "/usr/share/doc". Both "sudo" and "krb5" are problematic, here's an example:

Here's an example, running rpm -ql krb5-server-ldap | grep kerberos.schema print "/usr/share/doc/krb5-server-ldap-1.10.3/kerberos.schema" but the file doesnt exist.

Running yum reinstall krb5-server-ldap doesnt place the file back.

My understanding is that this is related to those lines where you probably try to reduce the overall container size. This is pretty agressive for an official image. Maybe an additionnal version centos6-minimal would be necessary or inversely one called centos6-full.

What do u think?

sbin/mount.vboxsf: mounting failed with the error: No such device

I have got below error when using centos/7 box from https://app.vagrantup.com/centos/boxes/7.

because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

Vagrant Version: 1.9.7

AMI kickstarts

I'm trying to build a VirtualBox/Vagrant image as close as practical (in terms of installed packages) to the official AMIs. It would be greatly appreciated if the kickstart files used for the official AMIs could be added.

Could not resolve host errors during vagrant up on yum install

Environment:
Windows 10 Home Edition
VirtualBox 5.0.30 (also tested with 5.0.32)
Vagrant 1.9.0 (also tested with 1.8.6)

Vagrant box: centos/7 v1611.01

Also tested with and without the following plugins: vagrant-vbguest (to install GuestAdditions) and vagrant-sshfs

During vagrant up I'm getting multiple Could not resolve host errors when yum install is performed. Basically it cannot resolve mirrors, but if I log in to the box after vagrant up, all hosts are resolvable.

With my custom provisioning shell scripts I was managed to resolve it by putting sleep 60 in the beginning of provisioning shell script (so it looks like some service is not working properly for the first few minutes after vagrant up), but I cannot do that for vagrant-vbguest or vagrant-sshfs and that causes failure.

It is always reproducible, but I was not able to find any info about similar issues.

Important thing to note, that there is no such issue with vagrant box centos/7 v1610.01 (previous version), but I cannot use it due to missing kernel headers which vagrant-vbguest plugin cannot install (that is a known issue, I guess)

this ks file gives me errors.

Started a few lines up from where the errors started.
It starts out fine downloading the rpms and then starts getting bash errors???

../ami-creator-master/ami_creator/ami_creator.py -c ./centos-5.11.ks -n centos511

.
.
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/sqlite-3.3.6-7.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/tar-1.15.1-32.el5_8.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/termcap-5.5-1.20060701.1.noarch.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/tzdata-2014e-1.el5.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/udev-095-14.32.el5.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/util-linux-2.13-0.59.el5_8.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/vim-minimal-7.0.109-7.2.el5.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm ...OK
Retrieving http://mirror.centos.org/centos/5.11/os/x86_64/CentOS/zlib-1.2.3-7.el5.x86_64.rpm ...OK
warning: libgcc-4.1.2-55.el5.x86_64: Header V3 DSA/SHA1 Signature, key ID e8562897: NOKEY
Installing: libgcc ##################### [ 1/112]
Installing: setup ##################### [ 2/112]
Installing: filesystem ##################### [ 3/112]
error: unpacking of archive failed on file /sys: cpio: chown
Installing: basesystem ##################### [ 4/112]
Installing: nash ##################### [ 5/112]
Installing: cracklib-dicts ##################### [ 6/112]
Installing: termcap ##################### [ 7/112]
Installing: centos-release-notes ##################### [ 8/112]
Installing: tzdata ##################### [ 9/112]
Installing: glibc-common ##################### [ 10/112]
Installing: glibc ##################### [ 11/112]
Installing: mktemp ##################### [ 12/112]
Installing: zlib ##################### [ 13/112]
Installing: chkconfig ##################### [ 14/112]
Installing: popt ##################### [ 15/112]
Installing: glib2 ##################### [ 16/112]
Installing: nspr ##################### [ 17/112]
Installing: bzip2-libs ##################### [ 18/112]
Installing: audit-libs ##################### [ 19/112]
Installing: libtermcap ##################### [ 20/112]
Installing: bash ##################### [ 21/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' Installing: ncurses ##################### [ 22/112] Installing: info ##################### [ 23/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: libsepol ##################### [ 24/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: readline ##################### [ 25/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: sqlite ##################### [ 26/112]
Installing: nss ##################### [ 27/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: sed ##################### [ 28/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $
' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: elfutils-libelf ##################### [ 29/112]
Installing: expat ##################### [ 30/112]
Installing: libattr ##################### [ 31/112]
Installing: libacl ##################### [ 32/112]
Installing: libstdc++ ##################### [ 33/112]
Installing: db4 ##################### [ 34/112]
Installing: iproute ##################### [ 35/112]
Installing: pcre ##################### [ 36/112]
Installing: grep ##################### [ 37/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' Installing: hmaccalc ##################### [ 38/112] Installing: binutils ##################### [ 39/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: gawk ##################### [ 40/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: cpio ##################### [ 41/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: diffutils ##################### [ 42/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: less ##################### [ 43/112] Installing: gzip ##################### [ 44/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $
' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: procps ##################### [ 45/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' Installing: libxml2 ##################### [ 46/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: iputils ##################### [ 47/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: centos-release ##################### [ 48/112] Installing: crontabs ##################### [ 49/112] Installing: redhat-logos ##################### [ 50/112] Installing: gdbm ##################### [ 51/112] Installing: libsysfs ##################### [ 52/112] Installing: sgpio ##################### [ 53/112] Installing: cyrus-sasl-lib ##################### [ 54/112] Installing: libcap ##################### [ 55/112] Installing: mingetty ##################### [ 56/112] Installing: ethtool ##################### [ 57/112] Installing: keyutils-libs ##################### [ 58/112] Installing: openssl ##################### [ 59/112] Installing: python-libs ##################### [ 60/112] Installing: python ##################### [ 61/112] Installing: cracklib ##################### [ 62/112] Installing: iscsi-initiator-utils ##################### [ 63/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: device-mapper-event ##################### [ 64/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: dmraid-events ##################### [ 65/112] Installing: findutils ##################### [ 66/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $
' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: psmisc ##################### [ 67/112]
Installing: net-tools ##################### [ 68/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' Installing: shadow-utils ##################### [ 69/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $' /bin/sh: error importing function definition forBASH_FUNC_module'
/usr/sbin/groupadd: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
/usr/sbin/groupadd: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
Installing: libutempter ### [ 70/112]warning: group utmp does not exist - using root
Installing: libutempter ##################### [ 70/112]
Installing: tar ##################### [ 71/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: SysVinit ##################### [ 72/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: e2fsprogs-libs ##################### [ 73/112]
Installing: e2fsprogs ##################### [ 74/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: lvm2 ##################### [ 75/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $
' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: device-mapper-multipath ##################### [ 76/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' Installing: dmraid ##################### [ 77/112] Installing: kpartx ##################### [ 78/112] Installing: device-mapper ##################### [ 79/112] Installing: logrotate ##################### [ 80/112] Installing: libselinux ##################### [ 81/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $' /bin/sh: error importing function definition forBASH_FUNC_module'
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: MAKEDEV ##################### [ 82/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: coreutils ##################### [ 83/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $
' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: pam ##################### [ 84/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: udev ##################### [ 85/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: krb5-libs ##################### [ 86/112] Installing: util-linux ##################### [ 87/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: mcstrans ##################### [ 88/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: rsyslog ##################### [ 89/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $
' /bin/sh: error importing function definition forBASH_FUNC_module'
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for BASH_FUNC_module' Installing: initscripts ##################### [ 90/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)'
/bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $_' /bin/sh: error importing function definition forBASH_FUNC_module'
Installing: module-init-tools ##################### [ 91/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )' /bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $_'
/bin/sh: error importing function definition forBASH_FUNC_module' Installing: mkinitrd ##################### [ 92/112] Installing: rpm ##################### [ 93/112] /bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token )'
/bin/sh: BASH_FUNC_module(): line 0:BASH_FUNC_module() () { eval /usr/bin/modulecmd bash $*' /bin/sh: error importing function definition for BASH_FUNC_module'
Installing: rpm-libs ##################### [ 94/112]
Installing: rpm-python ##################### [ 95/112]
Installing: bind-libs ##################### [ 96/112]
Installing: python-iniparse ##################### [ 97/112]
Installing: python-elementtree ##################### [ 98/112]
Installing: python-sqlite ##################### [ 99/112]
Installing: m2crypto ##################### [100/112]
Installing: python-urlgrabber ##################### [101/112]
Installing: yum-metadata-parser ##################### [102/112]
Installing: yum-fastestmirror ##################### [103/112]
Installing: yum ##################### [104/112]
Installing: openldap ##################### [105/112]
Installing: libuser ##################### [106/112]
Installing: passwd ##################### [107/112]
Installing: bind-utils ##################### [108/112]
Installing: libselinux-utils ##################### [109/112]
Installing: vim-minimal ##################### [110/112]
Installing: grub ##################### [111/112]
/bin/sh: BASH_FUNC_module(): line 0: syntax error near unexpected token)' /bin/sh: BASH_FUNC_module(): line 0: BASH_FUNC_module() () { eval/usr/bin/modulecmd bash $*'
/bin/sh: error importing function definition for`BASH_FUNC_module'
Installing: rootfiles ##################### [112/112]
filesystem-2.4.0-3.el5.centos.x86_64 was supposed to be installed but is not!

Traceback (most recent call last):
File "./ami-creator-master/ami_creator/ami_creator.py", line 222, in
sys.exit(main())
File "./ami-creator-master/ami_creator/ami_creator.py", line 204, in main
creator.configure()
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 737, in configure
self._run_post_scripts()
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 681, in _run_post_scripts
dir = self._instroot + "/tmp")
File "/usr/lib64/python2.6/tempfile.py", line 293, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
File "/usr/lib64/python2.6/tempfile.py", line 228, in _mkstemp_inner
fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory: '/var/tmp/imgcreate-D3rLot/install_root/tmp/ks-script-AflsR5'

localedef is missing

In the latest version of this image not root users get a bunch of issues with locales.

-bash: warning: setlocale: LC_CTYPE: cannot change locale (us): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (us): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (us): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (us): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (us): No such file or directory

When trying to fix it using localedef, it's not available.
localedef -c -f UTF-8 -i en_US en_US.UTF-8
fails because the command isn't installed.

You need to remove the package from the DB and then reinstall.
rpm -e glibc-common
yum install glibc-common

It would be nice if this were back in by default.

CentOS 6 i386

In order to i386/centos:6 to work with yum, I have to add:

RUN printf "i686\n" > /etc/yum/vars/arch &&
printf "i386\n" > /etc/yum/vars/basearch

to the top of every dockerfile, can we embed this in the base image?

containerbuild.sh taking forever in vagrant

I'm using the following vagrant box to build a centos 6 docker container.

http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1611_01.VirtualBox.box

The script isn't outputing any errors, but it's still running 24+ hours later. What is the normal build time? Is there any way I can debug the process?

[vagrant@localhost docker]$ sudo ./containerbuild.sh centos-6.ks
The Build root, /var/tmp/containers/20170110/centos-6, already exists.  Would you like to remove it? [y/N]
y
2017-01-10 19:09:17,742: disk_size = 3GB
2017-01-10 19:09:17,742: disk_img = /var/tmp/centos-6-docker.tar.xz
2017-01-10 19:09:17,743: install_log = /tmp/virt-install.log
mount: /dev/loop0 is write-protected, mounting read-only
WARNING  KVM acceleration not available, using 'qemu'
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

Starting install...
Retrieving file vmlinuz...                                  | 4.1 MB  00:00
Retrieving file initrd.img...                               |  39 MB  00:00
Allocating 'diskpzc4DO.img'                                 | 3.0 GB  00:00
Creating domain...                                          |    0 B  00:01
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
...............

centos7-arm64.ks build failed

Hi, @jperrin

when i use ami-creator to build docker/centos7-arm64.ks,it failed.why??
Thanks very much.

  Installing: grub2-efi                    ##################### [135/141]
  Installing: bind-utils                   ##################### [136/141]
  Installing: iputils                      ##################### [137/141]
  Installing: passwd                       ##################### [138/141]
  Installing: iproute                      ##################### [139/141]
  Installing: less                         ##################### [140/141]
  Installing: vim-minimal                  ##################### [141/141]
  Installing: rootfiles                    ##################### [142/141]

Error creating ami: Unable to run ['/usr/bin/firewall-offline-cmd', '--disabled']!

new value non-existent xfs filesystem is not valid as a default fs type

Hi,
We have tied "The easy way" to create 'centos-7-docker.tar.xz', but getting following error on ./containerbuild.sh centos-7.ks

Note: We are running the command inside centos container.

sh-4.2# ./containerbuild.sh centos-7.ks
2018-06-28 10:45:00,465: livemedia-creator 19.6.104-1
2018-06-28 10:45:00,502: disk_size = 3GB
2018-06-28 10:45:00,503: disk_img = /var/tmp/centos-7-docker.tar.xz
Starting installer, one moment...
anaconda argparse: terminal size detection failed, using default width
[Errno 25] Inappropriate ioctl for device
anaconda 21.48.22.134-1 for CentOS 7 Docker 7 (pre-release) started.
10:45:02 Running pre-installation scripts
10:45:03 Not asking for VNC because we don't have Xvnc
Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 1255, in <module>
    setupDisplay(anaconda, opts, addon_paths)
  File "/usr/sbin/anaconda", line 733, in setupDisplay
    anaconda.initInterface(addons)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 242, in initInterface
    self._intf = TextUserInterface(self.storage, self.payload,
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 175, in storage
    self._setDefaultFSType(self._storage)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 191, in _setDefaultFSType
    storage.setDefaultFSType(fstype)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1761, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1736, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent xfs filesystem is not valid as a default fs type
2018-06-28 10:45:10,144: Install failed: novirt_install failed
2018-06-28 10:45:10,144: Removing bad disk image
Traceback (most recent call last):
  File "/usr/sbin/livemedia-creator", line 1295, in <module>
    disk_img = make_image(opts, ks)
  File "/usr/sbin/livemedia-creator", line 914, in make_image
    os.unlink(disk_img)
OSError: [Errno 2] No such file or directory: '/var/tmp/centos-7-docker.tar.xz'

real	0m9.888s
user	0m4.681s
sys	0m4.887s
mv: cannot stat '/var/tmp/centos-7-docker.tar.xz': No such file or directory

systemd-journald and systems-tmpfiles always fail to start

I just noticed that the 1604 release candidate for the centos/7 Vagrant image repeatedly displays error messages in the console:

[   18.314609] systemd-journald[481]: Failed to get machine id: No such file or directory
[   18.331036] systemd[1]: systemd-journald.service: main process exited, code=exited, status=1/FAILURE
[   18.337177] systemd[1]: Job systemd-journal-flush.service/start failed with result 'dependency'.
[   18.337177] systemd[1]: Unit systemd-journald.service entered failed state.
[   18.337177] systemd[1]: systemd-journald.service failed.
[   18.337177] systemd[1]: systemd-journald.service has no holdoff time, scheduling restart.

and

[   18.655797] systemd-tmpfiles[466]: [/usr/lib/tmpfiles.d/systemd.conf:26] Failed to replace specifiers: /run/log/journal/%m
[   18.679951] systemd-tmpfiles[466]: [/usr/lib/tmpfiles.d/systemd.conf:28] Failed to replace specifiers: /run/log/journal/%m
[   18.739879] systemd-tmpfiles[466]: [/usr/lib/tmpfiles.d/systemd.conf:29] Failed to replace specifiers: /run/log/journal/%m
[   18.768804] systemd-tmpfiles[466]: [/usr/lib/tmpfiles.d/systemd.conf:32] Failed to replace specifiers: /var/log/journal/%m
[   18.781223] systemd-tmpfiles[466]: [/usr/lib/tmpfiles.d/systemd.conf:34] Failed to replace specifiers: /var/log/journal/%m
[   18.815924] systemd-tmpfiles[466]: [/usr/lib/tmpfiles.d/systemd.conf:35] Failed to replace specifiers: /var/log/journal/%m
[   18.923756] systemd[1]: systemd-tmpfiles-setup-dev.service: main process exited, code=exited, status=1/FAILURE
[   18.929707] systemd[1]: Unit systemd-tmpfiles-setup-dev.service entered failed state.
[   18.929756] systemd[1]: systemd-tmpfiles-setup-dev.service failed.
[   26.323071] systemd-tmpfiles[568]: [/usr/lib/tmpfiles.d/systemd.conf:26] Failed to replace specifiers: /run/log/journal/%m
[   26.323071] systemd-tmpfiles[568]: [/usr/lib/tmpfiles.d/systemd.conf:28] Failed to replace specifiers: /run/log/journal/%m
[   26.323071] systemd-tmpfiles[568]: [/usr/lib/tmpfiles.d/systemd.conf:29] Failed to replace specifiers: /run/log/journal/%m
[   26.346494] systemd-tmpfiles[568]: [/usr/lib/tmpfiles.d/systemd.conf:32] Failed to replace specifiers: /var/log/journal/%m
[   26.346494] systemd-tmpfiles[568]: [/usr/lib/tmpfiles.d/systemd.conf:34] Failed to replace specifiers: /var/log/journal/%m
[   26.370712] systemd-tmpfiles[568]: [/usr/lib/tmpfiles.d/systemd.conf:35] Failed to replace specifiers: /var/log/journal/%m
[   26.567235] systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
[   26.578816] systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
[   26.579016] systemd[1]: systemd-tmpfiles-setup.service failed.
[  934.557474] systemd-tmpfiles[11907]: [/usr/lib/tmpfiles.d/systemd.conf:26] Failed to replace specifiers: /run/log/journal/%m
[  934.557474] systemd-tmpfiles[11907]: [/usr/lib/tmpfiles.d/systemd.conf:28] Failed to replace specifiers: /run/log/journal/%m
[  934.557474] systemd-tmpfiles[11907]: [/usr/lib/tmpfiles.d/systemd.conf:29] Failed to replace specifiers: /run/log/journal/%m
[  934.557474] systemd-tmpfiles[11907]: [/usr/lib/tmpfiles.d/systemd.conf:32] Failed to replace specifiers: /var/log/journal/%m
[  934.557474] systemd-tmpfiles[11907]: [/usr/lib/tmpfiles.d/systemd.conf:34] Failed to replace specifiers: /var/log/journal/%m
[  934.557474] systemd-tmpfiles[11907]: [/usr/lib/tmpfiles.d/systemd.conf:35] Failed to replace specifiers: /var/log/journal/%m
[  934.676128] systemd[1]: systemd-tmpfiles-clean.service: main process exited, code=exited, status=1/FAILURE
[  934.676128] systemd[1]: Unit systemd-tmpfiles-clean.service entered failed state.
[  934.676128] systemd[1]: systemd-tmpfiles-clean.service failed.

As a consequence, journalctl is useless - no log files can be created.

centos/7 Vagrant box loses connectivity after resuming VMware Fusion host from sleep

This is a pretty minor issue, but now that I've finally tracked down what causes it (I think), I thought I'd submit this and see if other people have encountered it or have other ways to address it.

I believe the issue is basically as described here: https://bugzilla.redhat.com/show_bug.cgi?id=1093803. As an example of the behaviour:

  • vagrant up
  • An IP (192.168.143.131) is retrieved by dhclient from the host running VMware Fusion
  • Some time later, the host laptop is suspended, suspending the Vagrant instance as well
  • After some period of time (overnight is the most obvious example, but I can also reproduce after 2 hours reliably), the host laptop is resumed. vagrant ssh is fine at this point
  • The VM's time is updated to be correct. Initially we were doing this using VMware Tools, but the same behaviour occurs by just restarting the chronyd service that is already present in the standard box
  • The next messages in the system log show the previous DHCP lease being expired, and a new IP (192.168.143.132) is assigned
Jan 25 08:28:34 localhost NetworkManager[7441]: <info>  [1485332914.6230] dhcp4 (eth0): state changed bound -> expire
Jan 25 08:28:34 localhost NetworkManager[7441]: <info>  [1485332914.6266] dhcp4 (eth0): canceled DHCP transaction, DHCP client pid 11522
Jan 25 08:28:34 localhost NetworkManager[7441]: <info>  [1485332914.6266] dhcp4 (eth0): state changed expire -> done
Jan 25 08:28:34 localhost NetworkManager[7441]: <info>  [1485332914.6267] device (eth0): scheduling DHCPv4 restart in 120 seconds, 3 tries left (reason: lease expired)
Jan 25 08:30:35 localhost NetworkManager[7441]: <info>  [1485333035.1527] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jan 25 08:30:35 localhost NetworkManager[7441]: <info>  [1485333035.1661] dhcp4 (eth0): dhclient started with pid 11684
Jan 25 08:30:35 localhost dhclient[11684]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 (xid=0x28e18bc1)
Jan 25 08:30:42 localhost dhclient[11684]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16 (xid=0x28e18bc1)
Jan 25 08:30:43 localhost dhclient[11684]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x28e18bc1)
Jan 25 08:30:43 localhost dhclient[11684]: DHCPOFFER from 192.168.143.254
Jan 25 08:30:43 localhost dhclient[11684]: DHCPACK from 192.168.143.254 (xid=0x28e18bc1)
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0933] dhcp4 (eth0):   address 192.168.143.132
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0933] dhcp4 (eth0):   plen 24 (255.255.255.0)
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0933] dhcp4 (eth0):   gateway 192.168.143.2
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0933] dhcp4 (eth0):   server identifier 192.168.143.254
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0933] dhcp4 (eth0):   lease time 1800
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0934] dhcp4 (eth0):   nameserver '192.168.143.2'
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0934] dhcp4 (eth0):   domain name 'localdomain'
Jan 25 08:30:43 localhost NetworkManager[7441]: <info>  [1485333043.0934] dhcp4 (eth0): state changed unknown -> bound
  • At this point, any existing Vagrant sessions are dropped due to the IP change.

We have been able to work around the issue by setting dhcp=internal in NetworkManager.conf and restarting the guest. Subsequent suspend/resume cycles no longer lose their IP.

I'm guessing this is probably not an issue for most people due to not worrying about the the time being correct in their Vagrant boxes, but please let me know if that's not the case and maybe it is something about our environment that causes it. I'd be interested to know if similar occurs under VirtualBox as well.

VirtualBox Guest Additions in Vagrant image

It seems that the CentOS Cloud image for Vagrant (using the VirtualBox provider) does not include the VirtualBox Guest Additions:

$ vagrant init centos/7
$ vagrant up
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.

As mentioned in the log output above, the VirtualBox Guest Additions are useful for many purposes in day-to-day work with virtual machines. Would you please consider including them by default in the CentOS Cloud image for Vagrant (for the VirtualBox provider)?

kernel panic when shuting down qemu

Hi,

I was trying to build some tar rootfs to used with docker, but the creating is failing when the qemu is shunting down, and shows some kind of kernel panic.
I can not figure out what is wrong.

Can you help me?

Attaching the virt-install.log

virt-install.log.txt

Thanks

CentOS 6 Docker ContainerBuild Failing

I have been attempting to run the docker containerbuild.sh for centos 6, without much success on a Centos 7.4 host with the latest patches. Here are the things I have observed. (Centos 7 builds do work as expected.)
The first error I encountered was this:

Running pre-installation scripts
.
Starting package installation process

The installation was stopped due to incomplete spokes detected while running in non-interactive cmdline mode. Since there cannot be any questions in cmdline mode, edit your kickstart file and retry installation.
The exact error message is: 

CmdlineError: Missing package: firewalld.

The livemedia-creator command fails. The first issue seemingly has to do with the presence of line 21 in the kickstart file:

firewall --disabled

Removing that line allows the process to proceed to post installation before it fails. I am currently guessing this has to do with the use of anaconda on CentOS 7 to parse the Centos 6 kickstart file, given that CentOS 6 doesn't have firewalld. (It looks like there is a explicit yum remove command for firewalld as well, along with some commands to remove directories for firewalld, which is interesting considering it's not a part of the CentOS 6 distro, I am not sure why this is there. There is probably a reason. I haven't seen it in the commit history yet, when I went digging yesterday, but I was interrupted by other issues here.)

The next error set that shows up:

Installing rootfiles (158/158)
Performing post-installation setup tasks
Performing post-installation setup tasks
.

Configuring installed system

Running in cmdline mode, no interactive debugging allowed.
The exact error message is: 

[Errno 2] No such file or directory.

The installer will now terminate.
2018-03-08 13:20:59,337: Install failed: novirt_install failed
2018-03-08 13:20:59,338: Removing bad disk image

I have yet to have much chance to dig though all the anaconda logs in depth, this is what I found that seems to relate:

13:20:46,540 INFO anaconda: Performing post-installation setup tasks
13:20:46,545 INFO anaconda: Performing post-installation setup tasks
13:20:46,545 INFO anaconda: Thread Done: AnaInstallThread (139726017328896)
13:20:46,555 INFO anaconda: Running Thread: AnaConfigurationThread (139726017328896)
13:20:46,555 INFO anaconda: Configuring installed system
13:20:46,670 DEBUG anaconda: running handleException
13:20:46,672 CRIT anaconda: Traceback (most recent call last):

  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
    threading.Thread.run(self, *args, **kwargs)

  File "/usr/lib64/python2.7/threading.py", line 765, in run
    self.__target(*self.__args, **self.__kwargs)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 87, in doConfiguration
    ksdata.services.execute(storage, ksdata, instClass)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 1708, in execute
    iutil.execInSysroot("systemctl", ["enable", svc])

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 315, in execInSysroot
    return execWithRedirect(command, argv, stdin=stdin, root=getSysroot())

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 337, in execWithRedirect
    log_output=log_output, binary_output=binary_output)[0]

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 270, in _run_program
    env_prune=env_prune)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 196, in startProgram
    preexec_fn=preexec, cwd=root, env=env, **kwargs)

  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)

  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception

OSError: [Errno 2] No such file or directory

13:20:46,717 DEBUG anaconda: Gtk cannot be initialized
13:20:46,717 DEBUG anaconda: In a non-main thread, sending a message with exception data
13:20:46,717 INFO anaconda: Thread Done: AnaConfigurationThread (139726017328896)
13:20:47,564 DEBUG anaconda: running handleException
13:20:47,565 CRIT anaconda: Traceback (most recent call last):

  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
    threading.Thread.run(self, *args, **kwargs)

  File "/usr/lib64/python2.7/threading.py", line 765, in run
    self.__target(*self.__args, **self.__kwargs)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 87, in doConfiguration
    ksdata.services.execute(storage, ksdata, instClass)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 1708, in execute
    iutil.execInSysroot("systemctl", ["enable", svc])

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 315, in execInSysroot
    return execWithRedirect(command, argv, stdin=stdin, root=getSysroot())

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 337, in execWithRedirect
    log_output=log_output, binary_output=binary_output)[0]

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 270, in _run_program
    env_prune=env_prune)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 196, in startProgram
    preexec_fn=preexec, cwd=root, env=env, **kwargs)

  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)

  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception

OSError: [Errno 2] No such file or directory

13:20:47,566 DEBUG anaconda: Gtk cannot be initialized
13:20:47,566 DEBUG anaconda: In the main thread, running exception

This is as far as I made it before deciding to open this issue. I will probably do some more digging as I have time. For me, this isn't working. I don't know if anyone else can confirm similar issues. I've had this on both minimally installed machines and hosts with kitchen sink installs, so I don't think it's due to missing hidden requirements. That said, I could be wrong about that. Can anyone confirm this is currently working?

centos-7 ks support for ppc64le platform

I'm looking for the support of generating the centos docker images for ppc64le platform for which I was exploring this project to create ppc64le ks file to generate the image.

Seems like containerbuild.sh/livemedia-creator media needs the centos boot.iso @ http://mirror.centos.org/altarch/7/os/ppc64le/images/ but I couldn't see any such file like boot.iso file. Can someone tell me how should I really get that iso or is there a alternative to generate the boot.iso and create this image.

VMware Tools installation fails due to a dracut config error

The installation of VMware Tools fails when it tries to generate a new initramfs (also including its drivers). The problem is caused by missing spaces in the add_drivers lines in both our image's /etc/dracut.conf.d/vmware-fusion-drivers.conf file and vmware-tools.conf that VMware Tools generates. While we can only fix our own configuration file, it would probably be enough to avoid dracut errors during the VMware Tools installation.

Please see PR #67 for technical details.

do_vagrant_cbs.sh only works from the vagrant directory

It is currently necessary to first change the directory to vagrant, before calling the build script for the Vagrant images. In other works, the following works:

cd vagrant
./do_vagrant_cbs.sh all

... but invoking ./vagrant/do_vagrant_cbs.sh all from the top directory doesn't.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.