ovirt.te: iptables add user_tmpfs_t:file

This patch adds:
 - user_tmpfs_t:file { read open getattr };

Allows iptables start with ovirt-hosted-engine-setup.

Change-Id: Ia18df6785cdee385e1eaf930cca45132a4cfabf7
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
ovirt.te: svirt_t:process transition

This patch adds:
    - allow init_t svirt_t:process transition;

Change-Id: Ib03092123ddc4a85a6d9e96b4d0c45a03befd468
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
ovirt.te: svirt_t bin_t:file entrypoint

This patch adds:
   - allow svirt_t bin_t:file entrypoint;

Change-Id: I0b3d9a0960ffb03b73c7a02067f73e6d68881db4
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
installer: Handle fs discovery more careful

Previously findfs was called multiple times to discover a device for a
label, but that result was not used further on, instead it was tried to
discovered the device for a label again, and that could fail.

Now the device is discovered once, and reused further on.

Change-Id: I7326807c44f6906b2f216eef8be5a2b25d34b232
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1156112
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
Make EL7 register to SAM instead of RHN

rhnreg is a no-go on EL7. Use subscription-manager instead. This
is a workaround until the RHN code can be redone and modularized.
Additionally, properly set RHN_TYPE if no selection has been
made and there's nothing pending in the model.

This does not resolve the bug since a product certificate is
needed for subscription-manager to return 0, but allows
registration

Change-Id: I73c05c154a21a68b1fd99889a05b3f5abd7d98d9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1120558
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Fix the grub2 backup template

Missing an equals sign. Grub2 doesn't like it.

Change-Id: Ia77742fda7af2ee881950ae756f939227659bfb3
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1150868
Signed-off-by: Ryan Barry <rbarry@redhat.com>
edit-node: support /etc/rhsm/ca to yum

Mount bind /etc/rhsm/ca.

Change-Id: I37ac454137a1d86595dc5b6436f64f5074650539
Signed-off-by: hadong <hadong@redhat.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Make virt-who work again

The virt-who developers changed the structure of the package a bit
and we need to tweak a bit to account. Also, futureproof EL7 a
little since this change will probably land there as well.

Change-Id: I6955630310ed9b6f23336c21014ebcafce88f0f2
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1152414
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Strip the leading /dev/ from the console path

The kernel cmdline doesn't like /dev/${console}, use ${console}
instead.

Change-Id: I834cb74ac27c415537eb480694905c349f3164d5
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=966302
Signed-off-by: Ryan Barry <rbarry@redhat.com>
service: Ensure vdsm is starting after node

To prevent races, we now ensure that vdsm is started after all
ovirt-node related services.
We must also run before sanlock to ensure that all hooks are run before
sanlock comes up.

Change-Id: I84f849b4943f40c69336ea218a4bfcb3a2c11d02
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1156369
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1156369#c9
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
recipe: Disable ksmtuned

Change-Id: Iabd0d96045eb316fb9c6ec9dee46adca1f634886
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1156369
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
Log debug information if /liveos can't be mounted

If we can't mount /liveos, log as much information as we can
about the disks so we can try to get an idea why

Change-Id: Icb87ee4153842e90472508f0fa6594f204e84268
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158044
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Also dd GPT labels

wipefs may have problems with GPT labels on 4k disks. Get rid of
them. dd more of the disk as well

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158044
Change-Id: Iced15d58939b8e7e4e86d274d1c46123500e3e6d
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Use parted to rewrite the disklabel

Make an msdos disklabel, followed by a gpt disklabel, so we can
try to make sure the initial GPT label is gone

Change-Id: Iaaf40e8de8a4388c96c0a932a04d46d25501f177
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158044
Signed-off-by: Ryan Barry <rbarry@redhat.com>
patch udev rules to wait for triggering

To work around a potential udev race, update the rules to only
trigger kpartx on new paths, so it doesn't come up in the middle
of partitioning a disk.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158044
Change-Id: If838ea6fad66f873d6f7914eeb8447c204501505
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Fix rc.sysinit patching on 6.6

rc.sysinit changed a bit. Make the patch apply cleanly.

Change-Id: I6738243cd637e8595712fc84861532b175a29555
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Stop trying to patch mkdumprd on 6.6 and above

mkdumprd is better about detecting which devices are bridges, and
we don't need to patch it

Change-Id: Icced44728b59395299c643dbdf69fb114e530bbb
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Fudge kdumpctl to acknowledge "net" for SSH propagation

augeas can't set 'ssh' in kdumpctl yet, so we have to use net to
avoid using a template, but kdumpctl looks for 'ssh' explicitly

Work around it until augeas support goes to 7.0.z

Change-Id: I7b4a9f6a6086b96028d9f96c90f0a425dfcc805e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1095140
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Log system() failures in ovirtfunctions

Don't just silently return False. Log stderr and the output if
the command fails, so we have some idea that it failed and why.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158044
Change-Id: Icd1a8d425944c19e46e6189ae0983346d0154805
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Let us clear the console path

There was a bad comparison previously, so empty values could not
be used, and would not have cleared the console path in any case.
Make this possible.

Change-Id: I6857bd9c6c347da96a1221d2d824942aed603f0a
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1153922
Signed-off-by: Ryan Barry <rbarry@redhat.com>