2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-05 20:47:55 +00:00
Commit Graph

65 Commits

Author SHA1 Message Date
Vinícius Ferrão c390570e95 fix(mknb): compress the genesis image with xz when lzma is absent
The genesis image goes into a file whose name ends with .lzma. The plugin
writes that file only when /usr/bin/lzma is there, and it falls back to gzip
when it is not.

Red Hat ships no lzma binary. On AlmaLinux 9 and on AlmaLinux 10 that test
fails, the plugin falls back to gzip, and it gives no message that says why.
The image is larger on each run of mknb. Debian and Ubuntu ship lzma as a
second name for xz, so those systems still get the smaller image.

Ask xz for the same container when lzma is absent. The command
"xz --format=lzma" writes the same bytes as "lzma", so the file keeps its
name, its container and its size. Keep the gzip fallback for a system that
has neither program.

Recovered from the lenovobuild branch, which asked xz for the xz container.
That container is not the lzma container, and the name of the file says lzma.
2026-08-23 22:38:41 -03:00
Vinícius Ferrão 8f2c508950 fix(mknb): reject incomplete exports 2026-08-11 20:18:27 -03:00
Vinícius Ferrão 05e35a12e8 fix(mknb): identify exported Genesis images 2026-08-11 20:12:51 -03:00
Vinícius Ferrão 2ba1048f24 build(server): require Digest::SHA 2026-08-11 20:10:40 -03:00
Vinícius Ferrão 26b4aec340 feat(mknb): install exported Genesis images 2026-08-11 20:10:22 -03:00
Vinícius Ferrão aeb07dce85 fix(mknb): render Genesis boot paths correctly 2026-08-10 15:07:49 -03:00
Vinícius Ferrão 39f721713e fix(netboot): omit the default HTTP port from generated boot URLs
Boot URLs handed to nodes always carried an explicit :80 even when the HTTP
server listens on the default port. grub2.pm already omits the port when it is
80; make the xNBA, genesis and DHCP boot URLs consistent with it.

$portsuffix is empty when site.httpport is unset or 80 and ":<port>" otherwise,
so a non-default port is unchanged. Covers the ISC and Kea paths in dhcp.pm,
xnba.pm, mknb.pm, and the Kea xNBA client classes in BootPolicy.pm.

dhcp_boot_policy.t and mknb_xcatd_address.t follow the new URLs and gain cases
for a non-default and an unset port. The floating-address guard in
mknb_xcatd_address.t also drops :80 so that it keeps matching.

Recovered from the unmerged lenovobuild branch (cd61fd9d, a2f77ea9, 1035841b,
b7db0e2, 792fe6d).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-26 03:14:50 -03:00
Vinícius Ferrão 6da5efd29a fix(mknb): build the genesis image atomically to survive concurrent runs
mknb writes the compressed genesis filesystem by streaming cpio output
straight onto the final path in $tftpdir/xcat (genesis.fs.$arch.lzma or .gz).
When two mknb/nodeset runs target a shared $tftpdir at once, one run reads or
overwrites the other's half-written image, producing a corrupt genesis.fs and
failed netboots.

Write each image to a uniquely-suffixed temporary file
(xCAT::Utils::genpassword(24)) and File::Copy::move() it into place. move()
within the same directory is a rename, so the final path only ever appears
complete. Both modules are already imported by mknb.pm.

Recovered from the unmerged lenovobuild branch (originals c651e7b8 and its
fix da0723f2, which switched the suffix to genpassword after the first
attempt only produced a single character). master lacks the branch's xz
path, so only the lzma and gzip paths are adjusted here.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-21 16:24:08 -03:00
Vinícius Ferrão 3cd74bbab0 fix(mknb): avoid transient discovery addresses 2026-07-15 21:20:26 -03:00
Vinícius Ferrão 03a16dd081 fix: move kernel quiet flag from hardcoded to osimage default
The quiet kernel parameter was hardcoded in anaconda.pm and sles.pm,
making it impossible for admins to get verbose boot output without
editing plugin source code. The existing addkcmdline mechanism
(bootparams and linuximage tables) only appends to the kernel command
line, so there was no way to remove quiet.

Move quiet out of the plugin kcmdline construction and into the
linuximage.addkcmdline default set during copycds osimage creation.
Admins who want verbose boot for debugging can now remove it per
osimage:

    chdef -t osimage <image> addkcmdline=""

New osimages get addkcmdline="quiet" by default. Existing osimages
with a custom addkcmdline are not overwritten on re-run of copycds.

Genesis/discovery boot (mknb.pm) is unchanged as it does not use
osimage definitions.

Addresses #6916
2026-05-04 22:58:52 -03:00
davidmonro 661b579927 mknb: look for newer types of ssh keys to insert into the authorized keys file in the image (#7502) 2025-08-23 15:30:13 +02:00
besawn 89af19cecc Merge pull request #7249 from NCI-Cloud/mknb_initrd_file_fix
mknb: Correctly specify initrd file when generating netboot configs.
2022-11-14 16:27:09 -05:00
Mark Gurevich fc168cc9b8 Test lzma compression for genesis network boot 2022-11-08 14:46:00 -05:00
Simon Fowler 85a9e0abba Correctly specify initrd file for all netboot configs.
Previously the code which created the netboot config files was
incorrectly specifying the initrd file name in a number of places,
particularly in the xcat/xnba/nets/* files, using a hard-coded `.gz`
suffix even when a `.lzma` file had been created. This change ensures
that the initrd file name determined earlier in the code (either when
the image is created, or in the configonly case by checking the
filesystem) is used correctly when creating the netboot config files.
2022-09-12 13:37:29 +10:00
Mark Gurevich 42fbc2e063 Update BOOTIF 2021-11-02 14:53:23 -04:00
Mark Gurevich cf1e71445e Change uefi to not do elilo for network discovery boot 2021-11-01 15:06:50 -04:00
Yuan Bai 5db2dbd62c fix5209 nodeset cannot find pxelinux.0 (#5783)
* distro pxelinux.0 default path is changed in ubuntu 16.04
2018-11-09 17:03:58 +08:00
yangsbj 1889ec879d support site.httpport in nodeset and mknb 2018-11-01 23:29:01 -04:00
GONG Jie 6e096b05ad Remove trailing spaces in file xCAT-server/lib/xcat/plugins/mknb.pm 2017-12-31 23:59:59 +00:00
Jarrod Johnson 1dfc1ae80e Copy in hidden files to mknb
mknb was ignoring hidden files (e.g. .screenrc), fix this.
2017-11-07 11:52:16 -05:00
Bin Xu 7917678e39 Fix 3603, if using ppc64le/ppc64el for mknb, just use 'ppc64' as a substitude. 2017-08-03 15:52:25 +08:00
ertaozh 003290702e a syntax error within mknb.pm 2016-11-30 02:59:40 -05:00
Obihörnchen dc9ffa4307 Fix mknb: Undefined subroutine noderange
Add missing xCAT::NodeRange module
2016-11-18 15:47:47 -05:00
Victor Hu 263acbf5ce Based on Er Tao's comments, before going into the code for determining
the noboot nic names, parse out the interface names for the tagged vlans
without the physical name in the string
2016-11-15 16:48:45 -05:00
Victor Hu 2ca61ad9e8 Support noboot on interfaces that are tagged vlan on the mangement node 2016-11-14 13:31:48 -05:00
ertaozh 45c676e3a4 Fix issue 1881: Garrison boots genesis kernel when mutliple interfaces have dhcp dynamic ranges 2016-10-14 02:33:15 -04:00
Mark Gurevich 0a3fbd8d51 perltidy all perl files 2016-07-20 11:40:27 -04:00
Victor Hu 726d4d35f1 Fix the formatting of the file to use 3 spaces instead of tab 2016-06-07 13:49:13 -04:00
Victor Hu d73b02386a Adding quotes to the label and default tag. Without
this, petitboot menu does not count down by default
2016-06-07 13:40:11 -04:00
Victor Hu 9d7120d3c6 Add more information to the label to identify that the network
boot is the Genesis Kernel and the IP which is serving it
2016-05-26 15:53:41 -04:00
ertaozh 16d4e7de4a fix issue 1084: [FVT] 2.12 mknb failed on ubuntu 16.04 x86 env 2016-05-13 02:54:10 -04:00
Patrick Lundgren 850051bd75 removed keygen of rsa1 key and removed references / replaced with rsa key when appropriate 2016-04-12 09:50:16 -04:00
zhaoertao 754b22c710 enhance mknb <arch> -c command 2015-07-02 03:29:44 -04:00
zhaoertao c3a3b8083b add '-c' option for mknb to just create netboot configuration file 2015-07-01 04:33:14 -04:00
zhaoertao 32d389cbee add message for 'mknb' in ubuntu LE 2014-10-07 23:19:36 -07:00
mellor 3133cbeb3f 1. add xCAT depend on xcat-genesis-scripts, 2. fix mknb issue, 3. modify xcatconfig to call mknb <ppc64/x86_64> 2014-09-29 21:26:52 -07:00
mellor b06aa3afb0 enhance of creating default netboot configuration file for p8 hardware discovery 2014-09-24 20:23:20 -07:00
mellor 08e0ce42f0 correct the default configuration file for p8 hardware discovery 2014-09-24 02:41:55 -07:00
mellor ee1a1574c3 generate default netboot configure file for p8 hardware discovery 2014-09-24 02:38:54 -07:00
yinle 0e732ddc99 Remove the checking of yaboot-xcat to support removing yaboot-xcat rpm.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14517 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-12-03 06:25:21 +00:00
zhaoertao 3eda693ede fix subroutine moving issue in xCAT-server/lib/xcat/plugins/
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13504 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-08-14 11:55:48 +00:00
zhaoertao 40e144b4cc for item: clean up Utils.pm, the code in xCAT-server/lib/xcat/plugin/
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13467 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-08-09 04:07:40 +00:00
jbjohnso ca8dcb8bf4 Fix problem where mknb was not satisfied with genesis alone
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12916 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-05-23 19:19:40 +00:00
jjhua 9dac448093 For the places that open site table to read attributes, change to call xCAT::Utils->get_site_attribute instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12886 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-05-23 05:12:18 +00:00
jbjohnso aab44b34bd Fix problem where mknb failed to create a correct discovery configuration on rhel6 uefi environments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12138 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-05 21:12:08 +00:00
jbjohnso b201b45c7f Fix mknb construction of genesis when lzma is missing
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11527 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-09 16:18:40 +00:00
jbjohnso cd5ee8a18c Fix brace mismatch in mknb
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11474 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-03 21:24:31 +00:00
jbjohnso b8e6eadfaa Remove failed lzma attempt if applicable
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11440 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-31 16:45:38 +00:00
jbjohnso 0282e90cf0 Have bmcsetup work around a limitation of a certain service processor
Fix mknb to more comprehensively handle the lzma case

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11419 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-26 22:06:09 +00:00
jbjohnso 9b3a7ffb0e Prefer lzma when available for Genesis compression
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11386 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-16 14:34:32 +00:00