Commit Graph

239 Commits

Author SHA1 Message Date
Brian C. Lane 9b151ec2bd Update ostree boot handling
This makes sure the contents of /boot are at the expected locations in
/boot and in sys_root. For partitioned images it mounts the separate
/boot partition on /boot. For both fsimage and partitioned images ir
binf mounts it to sys_root so that the kernel+initrd can be found.

The boot directory isn't always named boot.0, so wildcard it and let the
count check handle failure if there is more than 1.
2016-04-29 16:09:03 -07:00
Brian C. Lane 6ed2aaed69 Refactor PXE live creation code
This moves the mounting inside make_live_images so that it isn't trying
to copy the fsimage while having it mounted.
2016-04-29 16:08:57 -07:00
Brian C. Lane efb0cce9b8 Change --make-pxe-live --no-virt use a fsimage
Instead of a partitioned disk image. This will allow a single pass
of lmc to be used to create an ostree live PXE image.
2016-04-29 16:08:54 -07:00
Brian C. Lane b72b41e690 Allow ostreesetup kickstart
Also make sure that a --make_pxe_live --no-virt doesn't use autopart or
other mountpoints.
2016-04-29 16:08:50 -07:00
Brian C. Lane 607d7c1eeb livemedia-creator: Make sure make-iso kickstart includes dracut-live
iso creation requires the dracut-live package, otherwise rebuilding the
initrd will crash. Since it takes a long time to discover let's fail
early.
2016-04-06 17:10:58 -07:00
Brian C. Lane bae111d5a3 livemedia-creator: Simplify cleanup for no-virt
If an anaconda no-virt run crashes it can leave things mounted under
/mnt/sysimage. Previously anaconda-cleanup was used to handle this, but
it will also try to cleanup host mountpoints which isn't desired.
2016-04-06 17:04:42 -07:00
Brian C. Lane f753a064b8 livemedia-creator: Use correct suffix on default image names (#1318958)
When an image name hasn't been passed, and the compression type is
something other than xz, the default image name should use the user
specified compression suffix.

Resolves: rhbz#1318958
2016-03-29 09:56:32 -07:00
Brian C. Lane 3740df3756 livemedia-creator: Pass -Xbcj to mksquashfs
Some cases of mksquashfs were not using -Xbcj when it is available for
the arch. This adds a function to return the correct args based on the
arch and the cmdline args.
2016-03-29 09:48:33 -07:00
Brian C. Lane b91e79d9bc livemedia-creator: Check selinux state and exit
lmc --no-virt was switching selinux to permissive if it was enforcing
and restore it when done. This works fine when it is the only session
running, but would cause problems if it was run in parallel.

It now only checks the state and exits with an error if it isn't already
disabled or in Permissive mode.

Users will need to run setenforce 0 before running lmc.
2016-03-28 16:40:16 -07:00
Brian C. Lane 0b9077ceaa Move argument parsers into pylorax.cmdline
This will make it possible to use sphinx-argparse to generate all the
documentation and manual pages.
2016-03-21 14:21:55 -07:00
Brian C. Lane 6798f7c5ec livemedia-creator: Fix off by 1024 error
commit 4699c88109 changed how the disk
size is estimated and not all users took into account that the return
value is in MiB.

This would result in qemu based iso installations having a rootfs.img
that was 1024x too large.
2016-03-21 12:14:28 -07:00
Brian C. Lane 3e9efdcf48 livemedia-creator: Change fsck.ext4 discard failures to errors
Something is causing problems with the ext4 rootfs.img when running with
no-virt inside koji. This results in a failed image that looks good
until you try to boot it.

make_squashfs will now return False if it fails, and make_live_image
will return None (instead of the result path). lmc will exit with a 1
and log an error.
2016-03-09 16:41:11 -08:00
Brian C. Lane 4699c88109 livemedia-creator: Create runtime using kickstart partition size
When using no-virt the runtime filesystem size comes from the kickstart.
For virt installs lmc was creating a runtime filesystem that was just
slightly larger than the space used by the files installed by anaconda.
This can run into problems with larger filesystem. It is also
inconsistent behavior between virt and no-virt installations.

With this commit the virt runtime filesystem will also come from the
kickstart.
2016-03-09 16:41:11 -08:00
Brian C. Lane a72e9aed0c livemedia-creator: Bump default releasever to 25 2016-03-04 08:57:55 -08:00
Brian C. Lane f8316a7b89 livemedia-creator: Use qemu instead of virt-install
Switching to using qemu directly allows lmc to be more flexible. It can
now run from inside a mock chroot for creation of all image types,
inculding disk images, and can take advantage of KVM on the host system
if /dev/kvm device is present inside the mock.

It should also be possible to create cross-arch images, but without kvm
available this is likely to be a very slow option.
2016-03-03 17:22:50 -08:00
Brian C. Lane 7c0a6dffd6 livemedia-creator: Stop passing --repo to anaconda (#1304802)
When running a no-virt installation it was parsing the kickstart url
method and passing it to anaconda using --repo which prevents it from
working with url --mirrorlist method. There is no good reason to do
this, anaconda gets the method directly from the kickstart when it isn't
on the cmdline.
2016-02-12 10:22:52 -08:00
Brian C. Lane c15349c3da livemedia-creator: Add /usr/share/lorax/templates.d/ support 2016-02-11 10:54:54 -08:00
Brian C. Lane 87d941b81a livemedia-creator: Add kernel-modules and kernel-modules-extra to examples
If you don't do this DNF will add the debug kernel to the package set to
satisfy kmod() requirements.

Also bump the default releasever for lmc to 24.
2016-01-13 14:31:40 -08:00
Brian C. Lane ba4218ea98 livemedia-creator: Make sure the rootfs.img can be compressed
Use 4k blocks for the ext4 filesystem. Run fsck on the filesystem to
make sure deleted blocks are actually zeroed, and pass -Xbcj to
mksquashfs.

4k blocks and -Xbcj decreases the size by 2-6% depending on the
filesystem size. Zeroing the blocks of the ext4 fs improves things
dramatically. The problem is that DNF downloads the rpms before
installing them. In addition to forcing us to use a larger filesystem
than we would like it leaves data that is difficult to compress on the
image. The downloaded files are removed, but need to be zeroed out so
that mksquashfs can compress it.
2016-01-13 08:09:01 -08:00
Brian C. Lane b138b27bd8 Add --iso-name to use with --iso-only
Instead of reusing --image-name add a new argument to name the iso. This
way the disk image can be given a unique name with --image-name and the
iso can be named something different.
2016-01-11 09:54:40 -08:00
Brian C. Lane a39ed39313 Prefix temporary files and directories with lmc-
This makes it easier to spot things leftover from a crash.
2016-01-08 08:53:55 -08:00
Brian C. Lane 059e40a64b Add --iso-only option to --make-iso
This option removes all the extra build artifacts from --make-iso,
leaving only the boot.iso

It also supports naming of the final iso with --image-name
2016-01-08 08:53:55 -08:00
Scott K Logan 33d008d9f2 livemedia-creator: Fix calculation of disk_size in some cases
If the kickstart includes multiple definitions for the same mount point,
the last one defined is used. The current code includes all of them in
size calculation, and the image file that livemedia-creator makes is big
enough to hold all of the partitions, even though the duplicates are
ignored by Anaconda.
2015-12-22 12:44:30 -08:00
Brian C. Lane be685b51ac livemedia-creator: Add --image-type and --qemu-args options
Also alias --qcow2 to --image-type=qcow2

This allows --make-disk to be used to create any disk image that
qemu-img supports, not just raw or qcow2. See qemu-img --help for a list
of the supported image types.
2015-12-21 16:13:08 -08:00
Brian C. Lane a3097b3085 Update things to make pylint 1.5.1 happy 2015-12-16 12:59:48 -08:00
Fabian Deutsch 0d22b72615 livemedia-creator: Raise an error if url is used without networking
Because livemedia-creator is using a media based installation by default,
no networking is brought up automatically. If then the url installation
method is used, it fails with an unclear reason.

This patch adds a check to raise a clear error if the url installation
method is used insisde the kickstart but no networking is configured.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-12-02 16:31:38 -08:00
Fabian Deutsch 3a8659e4e4 livemedia-creator: Fix a small typo
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-12-02 16:29:31 -08:00
Fabian Deutsch 1a653dad7f livemedia-creator: Use discard during installation
This could help to keep the disk size down during installation,
if the FS within the VM is also supporting TRIM.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-12-02 16:29:31 -08:00
Fabian Deutsch f2239d7860 livemedia-creator: Use cache=unsafe for the installation disk
This should improve the installation speed, as no sync is required on the
underlying disk.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-12-02 16:29:31 -08:00
Brian C. Lane e728e9ccee Include qemu modules in the initrd
This includes, among other things, virtio-rng. Without it the initrd may
take longer to initialize the random non-blocking pool on KVM
installations.
2015-11-23 09:33:42 -08:00
Brian C. Lane 50bda8cf17 livemedia-creator: Check kickstart for shutdown (#1207959)
When using virt with livemedia-creator the kickstart needs to include
shutdown to make sure it doesn't hang at the end of the installation.
2015-11-23 09:26:33 -08:00
Brian C. Lane 83acd6cec7 livemedia-creator: Correctly handle not mounting image
mktar may not be run if the mount failed, this is also an error so just
set rc=1
2015-11-23 09:26:09 -08:00
Brian C. Lane 4bc4b4c5a5 livemedia-creator: Use hd:LABEL for stage2 iso
The correct way with the current dracut (and it should be backwards
compatible) is to reference it as stage2=hd:LABEL=...
2015-11-23 09:26:09 -08:00
Brian C. Lane 7a1227a522 Add support for .repo files (#1264058)
This adds the --repo command which can be added multiple times to point
to dnf .repo files.

--enablerepo and --disablerepo can be used multiple times to control
which repos from the .repo files are actually used for the boot.iso
creation.

--repo can be used instead of --source, or in addition to it.
2015-11-18 16:53:32 -08:00
Brian C. Lane 8935460d06 livemedia-creator: Actually pass vcpus to virt-install
This passes the # of cpus from --vcpus to --virt-install. Previously it
was using whatever number virt-install defaults to.
2015-11-13 13:46:08 -08:00
Brian C. Lane e5c0c634b0 Add --virt-uefi to boot the VM using OVMF
This requires OVMF to be setup on the system, and for the kickstart to
create a /boot/efi/ partition. You can then use it to create UEFI
bootable partitioned disk images.
2015-11-05 09:33:15 -08:00
Brian C. Lane a252baed18 lorax: Improve argument parsing and help
Make the metavars useful, not STRING. Simplify some of the error
checking, let the parser handle it. Add type=os.path.abspath to several
path arguments so that relative paths will be converted to absolute
paths when they are processed.
2015-10-30 08:46:06 -07:00
Brian C. Lane 77a7eb266d lorax: Add --sharedir to override configuration path
One of the most useful things to override is the path to the templates,
this adds a cmdline option to do that instead of needing to create a
whole configuration file and pass it.
2015-10-30 08:46:06 -07:00
Brian C. Lane 3338de31f3 livemedia-creator: Allow novirt ostree partitioned images (#1273199)
A --no-virt --make-ostree-live build uses a partitioned disk image.
2015-10-28 14:44:24 -07:00
Brian C. Lane 5a9ffebe7c livemedia-creator: Make --make-vagrant work with --no-virt
Also added a check to make sure the optional vagrant metadata.json file
actually exists, if passed.
2015-10-20 17:45:53 -07:00
Brian C. Lane 04878b2a16 livemedia-creator: Add --make-vagrant command
This adds support for creating Vagrant boxes using virt-install. It also
includes an example kickstart that sets up the vagrant user with the
default ssh key.

The default result, without passing --image-name, is in
/var/tmp/vagrant.tar.xz
2015-10-20 17:45:53 -07:00
Brian C. Lane 6ccebefc26 livemedia-creator: Make --make-oci work with --no-virt
Also added a check to exit early if the config and runtime files don't
actually exist.
2015-10-20 17:43:39 -07:00
Brian C. Lane 3de5c0b53e livemedia-creator: Add --make-oci for Open Container Initiative images
This implements the bundle spec from:
https://github.com/opencontainers/specs

It creates a tar with the filesystem under /rootfs/ and includes user
provided config.json and runtime.json files.
2015-10-19 15:35:50 -07:00
Brian C. Lane d282f1fa8c Reduce the size of macboot.img (#952747)
The size estimate was counting the /EFI/BOOT/ contents twice and then
doubling that. Only count things once, then double it for the
System/Library/CoreServices/ copy.

hard-links don't work. With CoreServices hardlinked to /EFI/BOOT/ the
Mac won't boot. With /EFI/BOOT/ hardlinked to CoreServices grub2 cannot
read the config file so there are 2 real copies.

This reduces the image size from 21M to about 12M
2015-10-02 13:34:12 -07:00
Brian C. Lane 1c928080f2 Do not install weak deps in boot.iso 2015-09-11 14:04:34 -07:00
Brian C. Lane bf255a41a5 Don't include early microcode in initramfs (#1258498)
The system the image boots on will likely not match the host where lorax
was run, and in some cases this can cause systems to hang.

Resolves: rhbz#1258498
2015-09-01 09:51:47 -07:00
Brian C. Lane 394d37fbb5 livemedia-creator: no-virt fsimage should only use / size from ks
The amount of free space for / should be consistent between installation
types, otherwise some may have enough space, and others won't.
2015-08-28 11:37:05 -07:00
Brian C. Lane 9f702f5624 Use execReadlines in livemedia-creator
Log output from anaconda as it is received so that progress can be
monitored.
2015-07-30 09:05:31 -07:00
Brian C. Lane 11b8eb8b97 Add reset_lang argument to everything in executils.
Running anaconda from lmc needs to override the language reset,
otherwise libuser crashes because it cannot support "C".
2015-07-27 11:27:43 -07:00
David Shea 04d170bb09 Add a verification step to Lorax.run.
After the cleanup step, check that everything in /usr/bin and /usr/sbin
can still run. Currently, this just checks that ELF files have
everything they need to link, and scripts have an interpreter.

Verifying is on by default but can be skipped with --noverify
2015-07-20 16:18:20 -04:00
Chris Lumens c3743c54bc Pass setup_logging the log file, not the whole opts structure. 2015-06-03 08:55:34 -04:00
Chris Lumens ffa25dd609 Move IsoMountpoint into its own module. 2015-06-01 14:27:32 -04:00
Chris Lumens d23605d3cc Move setup_logging into pylorax/__init__.py. 2015-06-01 14:27:29 -04:00
Chris Lumens 893791cf7d Break all the log monitoring stuff from LMC out into its own module. 2015-05-29 13:53:07 -04:00
Brian C. Lane 1305d4d0f9 livemedia-creator: Catch missing package errors 2015-05-15 17:11:20 -07:00
Brian C. Lane 80f66d438d Convert livemedia-creator to py3 2015-05-15 17:11:20 -07:00
Brian C. Lane ca0bb2681e Change mkefiboot to py3
Just a couple prints.
2015-05-15 17:11:20 -07:00
Brian C. Lane 2f927118a7 Update lorax for python3 and argparse 2015-05-15 17:11:20 -07:00
Brian C. Lane a6e469e0e6 Clean up some pylint warnings
Mostly logging, using .format() on the strings.
2015-05-15 17:11:20 -07:00
Brian C. Lane 3148a2b215 livemedia-creator: Clean up resultdir handling 2015-03-24 14:21:18 -07:00
Colin Walters 67217f5642 Add ability for external templates to graft content into boot.iso
I originally added --add-template to support doing something similar
to pungi, which injects content into the system to be used by default.
However, this causes the content to be part of the squashfs, which
means PXE installations have to download significantly more data that
they may not need (if they actually want to pull the tree data from
the network, which is not an unusual case).

What I actually need is to be able to modify *both* the runtime image
and the arch-specific content.  For the runtime, I need to change
/usr/share/anaconda/interactive-defaults.ks to point to the new
content.  (Although, potentially we could patch Anaconda itself to
auto-detect an ostree repository configured in disk image, similar to
what it does for yum repositories)

For the arch-specfic image, I want to drop my content into the ISO
root.

So this patch adds --add-arch-template and --add-arch-template-var
in order to do the latter, while preserving the --add-template
to affect the runtime image.

Further, the templates will automatically graft in a directory named
"iso-graft/" from the working directory (if it exists).

(I suggest that external templates create a subdirectory named
 "content" to avoid clashes with any future lorax work)

Thus, this will be used by the Atomic Host lorax templates to inject
content/repo, but could be used by e.g. pungi to add content/rpms as
well.

I tried to avoid code deduplication by creating a new template for the
product.img bits and this, but that broke because the parent boot.iso
code needs access to the `${imggraft}` variable.  I think a real fix
here would involve turning the product.img, content/, *and* boot.iso
into a new template.
2015-03-19 16:48:16 -04:00
Brian C. Lane 7404a28c6f livemedia-creator: Fix up fake yum object for DNF change
pylorax unconditionally calls reset() on the dbo, so provide an empty
method to keep it happy.

The lmc dbo is minimal because it is only used for creating the iso, not
anything related to package installation.
2015-03-09 09:15:31 -07:00
Brian C. Lane c0ac3ad3bb Update logic for stage2 detection on boot.iso
The stage2 image can be either LiveOS/squashfs.img or it can be
images/install.img, adjust the IsoMountpoint for this and rename the
flag to .stage2 instead of .liveos
2015-03-09 08:32:57 -07:00
Brian C. Lane 62de8c26f8 Skip using srpm repos
DNF has a bug (#1191289) when the SRPM repo isn't the first one used,
and we don't need them for lorax anyway.
2015-02-16 08:47:31 -08:00
Brian C. Lane 9ff5897eee Get the log directory from the configfile
In the lorax script create it if missing and override it with the
path of --logfile
2015-02-16 08:47:30 -08:00
Brian C. Lane fe457ed71b lorax: Add --cachedir, --force and --workdir cmdline options
--cachedir allows the user to specify where the DNF cache is located.
This doesn't actually appear to do much since dnf erases the cache when
it is done. May be useful in the future.

--workdir sets the top level directory for lorax to use for installing
packages, creating installtree and installroot. Normally a temporary
directory under /var/tmp.

Note that the workdir will *not* be removed if there is an error setting
up the DNF object.

--force skips checking if the output directory exists, allowing things
like pungi to use lorax to place the output next to the repo tree it has
already created.
2015-02-16 08:47:30 -08:00
Brian C. Lane 1ec35938b3 Cleanup help alignment 2015-02-16 08:47:30 -08:00
Brian C. Lane 345cc89ee0 dnf: remove files from installed packages
This is a workaround for a current dnf bug, it doesn't update the state
of the packages after they are installed so we tear down the base dnf
object and create a new one pointing to the installroot.

There is an additional issue with the list of files returned, hawkey and
dnf don't appear to make a distinction between files, dirs and ghosted
dirs like yum did, this can result in too much being removed (eg. all of
/etc/selinux/) so we only remove files not directories.
2015-02-16 08:47:30 -08:00
Brian C. Lane 431ca6cea4 Switch lorax to use dnf instead of yum
pylorax users will need to change to using dnf and pass a dnf.Base()
object as the dbo argument instead of a yum object as the yum or ybo
argument. See the lorax script for an example of how to do this.

The lorax cmdline argument --excludepkgs has been removed since dnf
doesn't appear to have any way to support it and packages should be
controlled using templates anyway.
2015-02-16 08:47:30 -08:00
Brian C. Lane 3f77b80d6c Use /usr/bin/python2 in scripts
New packaging guidelines:

https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes
https://fedorahosted.org/fpc/ticket/327#comment:9
2015-02-09 08:48:22 -08:00
Brian C. Lane 30c21a1b97 livemedia-creator: Add --timeout option to cancel install after X minutes
Installations sometimes get stuck. This adds the option to cancel it
after some number of minutes have passed.
2015-02-02 12:44:32 -08:00
Brian C. Lane c231c2a63f livemedia-creator: Bump default releasever to 22 2015-01-20 10:59:18 -08:00
Radek Vykydal 5aa6bb5f0c Add --live-rootfs-keep-size option 2015-01-16 10:01:41 +01:00
Radek Vykydal d16bdcaf6d Add --live-rootfs-size option. 2015-01-16 10:01:41 +01:00
Brian C. Lane 879d831ffc livemedia-creator: Turn on debug output for dracut
Some dracut failures are hard to detect without debug enabled, so just
turn it on all the time.
2015-01-15 09:39:15 -08:00
Brian C. Lane 563f4386e8 livemedia-creator: Copy all the logs from /tmp/
It wasn't copying new logs from dnf, kickstart script logs or
tracebacks.
2015-01-15 09:39:15 -08:00
Brian C. Lane 8641caca9e livemedia-creator: Create parent dirs for logfile path
The directory where the --logfile is located is also used for other log
files and for the anaconda logs when using --no-virt. Create the parent
directories if they don't exist.
2015-01-15 09:39:15 -08:00
Radek Vykydal 14494461a9 --make-pxe-target: change permissions of regenerated initramrfs to 0644 2015-01-15 11:03:15 +01:00
Brian C. Lane cd7adac241 livemedia-creator: add a timeout to the log monitor startup 2015-01-14 07:47:19 -08:00
Radek Vykydal a19c509430 Add --make-pxe-live and --make-ostree-live (for Atomic) targets.
--make-pxe-live target generate live squashfs and initrd for pxe boot.
Also generates pxe config template.

--make-ostree-live is used for installations of Atomic Host. Additionally to
--make-pxe-live it ensures using deployment root instead of physical root of
installed disk image where needed. Atomic installation needs to be virt
installation with /boot on separate partition (the only way supported by
Anaconda currently). Content of boot partition is added to live root fs so that
ostree can find deployment by boot configuration.
2015-01-13 12:45:06 +01:00
Brian C. Lane d96ed99621 Add log monitoring to lmc --no-virt installation
Previously if there was an error during a novirt installation that
didn't exit the process there was no way to detect it. This uses the new
--remotelog option for anaconda to monitor the logs for errors using the
same criteria as it does when monitoring a virt install. If there is an
error the anaconda process will be terminated and the logs will be
gathered up into ./anaconda/
2015-01-09 15:05:12 -08:00
Colin Walters 52d962d613 Add --includepkg argument
Recently, Fedora has been trying to do a 3 product split.  As part of
that, lorax was changed to do "installpkg lorax-product-*" via
provides.

I think that approach is awkward; a much simpler approach is to simply
specify the product package as input to lorax on the command line, via
external rel-eng scripts.

This patch therefore adds --includepkg (and we should probably add an
option to remove the implicit lorax-product-* glob).
2014-12-05 15:58:58 -08:00
Brian C. Lane 30501ff492 livemedia-creator: Add nfs support for no-virt mode (#1121255) 2014-10-09 17:27:39 -07:00
Peter Jones a05348ee9f Look for "BOOT${efiarch}.EFI" in mkefiboot as well.
The aarch64 change to use shim (6907567) also stopped using mixed-case
names for BOOT${efiarch}.efi (so it's always .EFI and ${efiarch} is X64
IA32 AA64 etc. now), and mkefiboot needs to match that.

Related: rhbz#1043274
Related: rhbz#1100048
2014-10-07 10:53:08 -04:00
Brian C. Lane 1688a3c3a9 livemedia-creator: Make sure ROOT_PATH exists (#1144140)
If ROOT_PATH doesn't exist when making a tar file, create it first.

Related: rhbz#1144140
(cherry picked from commit da68471b33)
2014-09-23 11:49:02 -07:00
Brian C. Lane c8afae35b4 livemedia-creator: Add ppc64 live creation support (#1102318)
The ppc config files were missing from the live config_files directory
and ppc needs the correct lib directory so lmc has been switched to use
ArchData driven from the installed kernel arch.

Resolves: rhbz#1102318
(cherry picked from commit 59f256e989)
2014-08-27 16:40:50 -07:00
Brian C. Lane bb445e2deb livemedia-creator: Padd disk size by 2MiB
When using GPT it reserves a few more sectors at the end of the disk for
the copy of the GPT so pad the size of the partitions in the kickstart
by 2MiB instead of 1MiB to account for this.
2014-08-08 15:38:33 -07:00
Brian C. Lane ffa40722dd livemedia-creator: Run setfiles after no-virt installation
Depending on the environment that --no-virt is run inside the resulting
filesystem may need to have the SELinux labels updates. Run setfiles on
the new filesystem after the anaconda run has finished.

eg. when run from inside mock the labels will be incorrect.
2014-08-06 09:11:59 -07:00
Colin Walters 611cef1823 https is a sane package source URL scheme
Add https as a URL source and use list comprehension to check the
supported protocols.
2014-07-31 14:29:02 -07:00
Brian C. Lane c875a72020 livemedia-creator: close the socket when done
In some cases the socket may not be closed, so make sure it is to
prevent hangs when shutting down the virt.
2014-07-16 11:50:25 -07:00
Brian C. Lane 41b58f8f6c livemedia-creator: Allow the boot.iso to be shared
This allows the boot.iso to be used by multiple instances of lmc (or
virt-install if they also set --disk shareable=on)
2014-07-09 10:05:18 -07:00
Brian C. Lane 5f96701caf livemedia-creator: log more failure information
This switches on the rc checking in execWithRedirect and logs the error
it raises.
2014-07-08 13:24:58 -07:00
Brian C. Lane fd4afe2530 livemedia-creator: drop console=ttyS0
This no longer seems to be needed, and causes images created without
passing --vnc vnc to start up with a serial console. If you need a
serial console you can pass it using --kernel-args
2014-07-08 13:24:58 -07:00
Brian C. Lane ee54cc6c31 livemedia-creator: Log the line that caused the failure
Sometimes it can be hard to tell exactly what triggered the error
detection, so log the line that matched.
2014-07-08 13:24:58 -07:00
Brian C. Lane 380a6ddd6d livemedia-creator: add more errors
Add check for running traceback script and when the retry fails.

This also indicates something went wrong with the installation, exit
when they are seen in the logs.

Also drop looking for WARNING in the regex errors, they will be errors
after the syslog level name remap patch goes into anaconda.
2014-07-08 13:24:58 -07:00
Chris Lumens b7be1d97fe Allow doing non-URL installs if using virt.
In this case, we don't need to pass a repo parameter to anaconda.  It's running
in a VM and knows how to deal with a kickstart file.
2014-07-07 10:01:43 -04:00
Peter Jones c789f20b66 Don't emit media labels with spaces in them.
Spaces cause various bugs like #923374 and #855849 , and it would be
better if we just didn't use them.

Note that there's a corresponding pungi change to go with this.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-07-01 11:59:19 -04:00
Brian C. Lane 29de1d43a5 livemedia-creator: Ignore IGNORED errors in anaconda logs 2014-06-26 13:01:59 -07:00
Brian C. Lane b22a7df476 livemedia-creator: Handle virt-install failure cleanup
Unmount the iso and remove the disk, if it exists.
2014-06-19 16:43:39 -07:00
Brian C. Lane d79222e8ea livemedia-creator: Fail when there are missing packages
Watch the logs for  WARNING packaging: .* requires .* which indicates
that there are missing packages and it is sitting at a prompt waiting
for user input.
2014-06-19 16:43:39 -07:00