Commit Graph

219 Commits

Author SHA1 Message Date
David Cassany
7fad743ecc Evaluate UNIONFS_CONFIG filesystem
This commit makes sure the filesystem is parsed from the
UNIONFS_CONFIG configuration variable when the PXE image is
loaded to a block device.

This commit fixes #316
2017-04-28 12:33:12 +02:00
Marcus Schäfer
f752489038 Merge pull request #296 from SUSE/uefi_live_builder_fix
Uefi live builder fix
2017-04-10 16:38:38 +02:00
David Cassany
40dae55bc3 Rename SLE13 to SLE15 2017-04-10 15:46:05 +02:00
Marcus Schäfer
a66c5141a6
Cleanup use of bootloader path in boot code
Instead of repeating the bootloader path only specify it
once per setup path
2017-04-10 15:03:04 +02:00
Marcus Schäfer
128e48734e
Fixup copy of array in boot code
The filtered nic interface names are stored in an array
and copied back into the original array. The copy of the
array was semantically wrong
2017-04-04 11:00:27 +02:00
Marcus Schäfer
61021391ee Merge pull request #284 from SUSE/SLE13_descriptions
Include SLE13 boot descriptions for x86_64 and arm
2017-03-31 11:33:57 +02:00
David Cassany
b6cd573c50 Include SLE13 boot descriptions for x86_64 and arm
This commit includes boot descriptions for SLE13, the descriptions
are based on leap 42.3.
2017-03-31 11:25:49 +02:00
Marcus Schäfer
249871eaea Added <oem-nic-filter> element
Allow network interface names to be filtered by the given
regular expression. The expression is handled by the bash
regexp operator. Interface names matching the rule will be
filtered out, all others stay. It is also possible to pass
the variable kiwi_oemnicfilter as kernel command line in a
PXE deployment. Fixes #245
2017-03-28 11:26:03 +02:00
Marcus Schäfer
88525f981c
Throw a proper exception on missing boot reference 2017-03-22 15:00:32 +01:00
Marcus Schäfer
e54916a1c8 Refactor ip link detection
There is no reliable way to check if a link is unplugged, thus
the code has changed into the following workflow

1. use interfaces which returns success on ip link set up
2. wait for the UP state on all of these interfaces and return
   if one of them enters the UP state
3. call a fixed wait state to allow to kernel network drivers
   to settle
4. run through all remaining interfaces, discover the link
   state and call a DHCP discovery
2017-03-21 17:41:31 +01:00
Marcus Schäfer
b9129fab8d
Added Leap42.3 boot descriptions 2017-03-08 17:24:18 +01:00
Marcus Schäfer
2ba3d0c092
Deleted openSUSE 13.2 boot descriptions 2017-03-08 17:23:43 +01:00
Marcus Schäfer
1a5257a0e8 Prevent use of project relative import statements
For details on the motivation of this change please visit:
https://wiki.python.org/moin/FutureProofPython
2017-03-07 11:23:37 +01:00
Marcus Schäfer
7285b498b3
Follow up fix for network driver delay
Each network interface will be switched off for a short
moment when the kernel network driver is loaded. During
that time the link status information would be misleading.
Thus we wait a short time before the link status check
is started
2017-02-21 09:20:45 +01:00
Marcus Schäfer
5f96113350
Wait for network drivers to pass init
Before we check for the link status a waid period of 3 seconds
should guarantee that the network drivers have passed the init
routines
2017-02-20 11:34:13 +01:00
Marcus Schäfer
22b286e6f4
Refactor waitForLinkUp
Put code which does not belong into the loop outside of
the loop. Also maintain sleep timeout and retry count
in variables
2017-02-16 15:37:34 +01:00
Marcus Schäfer
357502a032 Fixed waitForLinkUp and setIPLinkUp
The setIPLinkUp method did not handle the return value of the
waitForLinkUp call and always returned success even if
waitForLinkUp ran into a timeout

The waitForLinkUp method was improved in a way that it does
not wait if the link detection discovered the interface is
unplugged. The detection if a cable is connected or not only
works if the ifplugstatus tool was found in the initrd
2017-02-16 15:28:52 +01:00
Marcus Schäfer
1ef41aaefd
Prevent quoted domain name in dhclientImportInfo
We're getting domain name by parsion a lease file. Unfortunately in
lease file domain name is quoted, which breaks linux resolver.
This commit gets domainname unquoted
2017-02-08 10:56:06 +01:00
Marcus Schäfer
e612e4e5cf
Fixup setupMachineID
Cleaning up existing machine id files by deleting them
causes an interactive session to be started by systemd
This is something we don't want. As the consequences
of touching the machine id files seems to be too critical
the method has been turned into a hook caller. This
allows the user to make use of it on their own purpose
and by default doesn't mess with the machine id files
2017-01-26 11:35:13 +01:00
Marcus Schäfer
df77ebefae
Change processing of setupMachineID
Instead of creating new machine ids for systemd and dbus
the method now cleans up all existing machine ids and
leave it up to systemd to initialize and create new ids.
This allows to make use of the native way how systemd
retrieves and handles machine ids
2017-01-24 09:46:13 +01:00
Marcus Schäfer
99e108feec Merge pull request #223 from SUSE/oem-unattended-unix-device
Allow unix device names in oem-unattended-id setup
2017-01-18 14:33:23 +01:00
Marcus Schäfer
0cbd2a7f89 Merge pull request #222 from SUSE/dbus_id
Make sure setupMachineID also cares for dbus
2017-01-18 14:31:27 +01:00
Marcus Schäfer
0cfd4cca5e
Allow unix device names in oem-unattended-id setup
In order to allow a raw device name in oem-unattended-id
the /dev tree has been added to search list. This is useful
if e.g a ramdisk device which is not part of any /dev/disk/...
or /dev/mapper device map should be used as target disk for
the deployment. Thus a setup to stick the deployment to
e.g /dev/ram1 would look like this

<oem-unattended-id>ram1</oem-unattended-id>

This Fixes #221
2017-01-17 16:21:15 +01:00
Marcus Schäfer
387970a761
Don't delete ip tools from oemboot
network tools are needed for oem disk deployment via pxe
2017-01-17 16:05:45 +01:00
Marcus Schäfer
7d27eed783 Make sure setupMachineID also cares for dbus
Systemd and dbus should use the same machine-id. Therefore
a symlink /var/lib/dbus/machine-id pointing to /etc/machine-id
is created right after systemd-machine-id-setup. Fixes #219
2017-01-17 12:09:35 +01:00
Marcus Schäfer
3c7ba8b924
Auto update image descriptions to schema v6.5 2017-01-09 11:04:10 +01:00
Marcus Schäfer
efb7719c78
Fixed expansion of msdos disks
If the target disk size is beyond 2TB it can't be expanded to
the full size if the msdos partition table layout is in use.
Because of this the disk expansion will be limited to the
allowed maximum for the msdos partition table type which is
at 2TB. This fixes bnc#1010966
2016-11-25 11:22:31 +01:00
Marcus Schäfer
8e3e96d653 Fixup style to be more pythonic 2016-11-21 09:12:24 +01:00
Marcus Schäfer
39d5db9881 Fixed kernel name lookup
Complete the list of kernel names for the lookup. Normally
the kernel package provides a symlink to the actual kernel
image file. However if the link does not exist we extend the
search to a collection of names for possible kernel images.
The new list now also covers kernel names as used for arm

Along with the change this patch also provides an option to
raise an exception if the kernel lookup did not find any
kernel, which is used for the get_kernel() request in the
dracut initrd system setup where it is mandatory to find
a kernel image.

This fixes bnc#1010874
2016-11-21 09:07:50 +01:00
Marcus Schäfer
900a0de518
Fixed release network using ip tool
Apply the cidr fix from setupNic and introduce a new method
called deleteNic which replaces the wrong ip call from the
releaseNetwork method. Fixes bnc#1003091
2016-11-18 16:24:43 +01:00
Marcus Schäfer
abdc2ace4d
Fixup lease time in setupNetworkWicked
The default lease time with 300s used by wicked is relatively
short and different from the default lease time of the former
dhcpcd. This change causes wicked to use a lease time of 3600s
This is related to bnc#1003091
2016-11-17 10:57:55 +01:00
Marcus Schäfer
9b386af20d
Fixup default behavior of releaseNetwork
If no tool was found to communicate with the dhcp server
in order to free the lease the method did nothing. However
it should at least bring down the network. This is
related to bnc#1003091
2016-11-17 10:49:00 +01:00
Marcus Schäfer
dfd27049e3
Fixup setupNic for address information in cidr
Ignore netmask if address is already in cidr format
2016-11-16 15:57:00 +01:00
Marcus Schäfer
3a1edc250f
Fixup netboot code for multipath boot device
If the root disk in a netboot deployment is a multipath device
we have to make sure the multipathd is started and the boot
device is mapped to the wwn
2016-11-11 16:13:57 +01:00
Marcus Schäfer
bfcfaa5ed4 Merge pull request #185 from SUSE/isoboot_read_only_ram_disk
ActivateImage links correction
2016-11-08 12:44:44 +01:00
David Cassany
2e9769e8b0 ActivateImage links correction
Loading the iso image into a read-only ramdisk caused some issues
due to the activatImage method cp commands. With this commit the
symlinks are consistent during the preinit phase and also before
running the cp command it is tested we are not in a read-only
filesystem.

This commit is a port form openSUSE/kiwi#613 PR
2016-11-08 12:23:35 +01:00
Marcus Schäfer
2dec2fa4d8
Fixup ip setup in setupNic
The invocation of ip in setupNic was invalid. The way this
was done causes the netmask to be set as broadcast address
Related to bnc#1003091
2016-11-07 15:49:44 +01:00
David Cassany
f04e55c6a5 updateOtherDeviceFstab did not get the fstab location parameter
This is port from the kiwi v7 code base openSUSE/kiwi#610
2016-11-04 11:08:54 +01:00
Marcus Schäfer
88fc64965a
Fixed waitForStorageDevice
Value for storage_size was not really used
2016-11-02 17:31:06 +01:00
Marcus Schäfer
6780584ccc
Make sure kiwiserver/kiwiservertype is used
If kiwiserver and/or kiwiservertype is specified on the
kernel commandline they should take over precedence for
up- and download of image files compared to the host
setup in the IMAGE variable.
2016-11-02 12:04:44 +01:00
Marcus Schäfer
fb304ed35a
Fixup the wicked thing again 2016-10-31 14:56:30 +01:00
Marcus Schäfer
16788ad34c
Put setupNetworkWicked in line with former dhcpcd
The way setupNetworkWicked implements the dhcp discovery was
incomplete. This Fixes bnc#1003091
2016-10-31 11:16:54 +01:00
Marcus Schäfer
368884dfb1
Fixup assembling of mdraid array
when udev discovers an mdraid array it partially starts the array.
That is interfering with the mdadm --assemble call by kiwi which
leads to a busy state and an array in inactive state. Therefore
the method should wait until the raid array really exists no
matter if the assembling is started by udev or kiwi's mdadm call.

In addition if the array got assembled but is incomplete because
devices are missing or the timout is fired, an additional call to
start any array that has been partially assembled is required.

pxeRaidAssemble will throw an exception if after this call no
md device with a size > 0 will show up after a timeout. This
Fixes bnc#1000742
2016-10-28 11:46:54 +02:00
Marcus Schäfer
812d544d4b
Fixup waitForStorageDevice
The function will return success if the size of the storage
device can be obtained and is greater than zero. The pure
success on reading from the block layer is not enough. In
order to actually work with the device it must provide a
size > 0. Related to bnc#1000742
2016-10-28 11:46:14 +02:00
Marcus Schäfer
93cccef37a Merge pull request #176 from SUSE/boot_systemprepare_cleanup
SystemPrepare instance delete before runnig SystemSetup
2016-10-27 14:31:25 +02:00
David Cassany
64d13ce5a3 SystemPrepare instance delete before runnig SystemSetup
This commit fixes#175, now multiple profiles in OBS are possible using
kiwi boot initrd.
2016-10-26 17:25:07 +02:00
Marcus Schäfer
862cb1c5d9 Initialize the systemd machine ID on first boot
The systemd machine id is considered to be a unique information
Thus it is required to initialize it on first boot of the image.
If the image uses the kiwi boot code (initrd) this action is
performed and and Fixes #169
2016-10-25 12:20:19 +02:00
David Cassany
5676f2e4d0 Fixed a rounding error in partedMBToCylinder method
bc truncates number of cylinders to zero decimal places, which results
in a partition that is slightly smaller than the requested size. Add one
cylinder to compensate.
2016-10-20 16:01:43 +02:00
Marcus Schäfer
368a9b1cbb Call dracut in system root tree
Change BootImageDracut class to call dracut in the specified
system root directory and not in a self prepared new root environment.
dracut reads scripts and dracut module configurations from the
installed system components, e.g kdump. Therefore calling it
from an isolated runtime environment creates an initrd which is
not matching the system components. Fixes bnc#1005246
2016-10-18 12:22:01 +02:00
Marcus Schäfer
ac867be470
Add grub2-efi-modules in rhel boot descriptions
This package provides the efi modules which are needed if
a custom efi module is build by kiwi via grub2-mkimage
2016-10-17 11:26:16 +02:00