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

107 Commits

Author SHA1 Message Date
Daniel Hilst a0c8f7eae7 fix(xcat-core): trim the commentary around the Subiquity diskful fix
Three passes of the same reasoning had accumulated: in the code, in the POD of the routines the
previous commit extracted, and again in the test headers. Say each once, where the reader needs it.

The POD blocks were the worst of it -- extracting subiquity_kcmdline() and
defer_syncfiles_to_postboot() moved the essays out of the routines but did not shorten them. The
toram paragraph ran eleven lines for one kernel argument; the exact systemd-shutdown message and
the size of the 24.04 layers are colour, not reasoning.

The template's two comments and the apt-sources pair are trimmed the same way: the sources.list
explanation lives in Template.pm, and the test says which case it is checking and points there.

That the tests still pass after rewriting the template is the point of the previous commit -- a
test matching its text would have broken here.

47 comment and POD lines removed, no behaviour change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-27 16:00:57 -03:00
Daniel Hilst 00ef09add2 test(xcat-core): assert the Subiquity install behaviour instead of the source that implements it
The tests added with this fix matched regexes against the text of debian.pm, Postage.pm and
compute.subiquity.tmpl. A source match cannot tell whether the code it found ever runs: moving
the Subiquity command line into its own routine leaves every one of those assertions passing,
and reformatting a line fails them while the behaviour is untouched. One of them pinned Perl
syntax outright, qr/\$kcmdline\s*\.=\s*" ---";/, and another matched the text of a substitution.

Run the code instead.

Two decisions were lifted out of the routines that had grown around them, so a test can call
them: subiquity_kcmdline() in debian.pm builds the installer command line from its inputs, and
defer_syncfiles_to_postboot() in Postage.pm returns the adjusted postscript lists. Both are pure
and carry the reasoning that used to sit inline. The callers keep their behaviour exactly.

The template's two shell fragments are extracted and executed: the boot flip runs against a
stand-in for xcatd on the install-monitor port, and the resolv.conf step runs with a getent that
answers as the case requires.

Every assertion now fails when the behaviour it describes is removed, which is what the source
matches only appeared to do:

  boot=casper dropped from the command line     1 assertion fails
  toram dropped                                 1 assertion fails
  nfsroot given the host name instead of the IP 2 assertions fail
  the deferral made a no-op                     7 assertions fail
  the wrong token sent to xcatd                 1 assertion fails
  the failed-flip log line removed              3 assertions fail
  the retry loop reduced to one attempt         2 assertions fail
  resolv.conf given the host name               3 assertions fail
  the resolution fallback removed               2 assertions fail

ubuntu_subiquity_bootparams.t is removed. Its three matches are covered by execution in
debian_subiquity_netboot.t, and it demonstrated the problem: it still passed after the command
line moved into another routine.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-26 17:31:46 -03:00
Daniel Hilst a6f77a9732 fix(xcat-core): complete the Ubuntu Subiquity diskful install
Boot the live installer correctly. Add boot=casper so casper actually processes
netboot=nfs instead of scanning local disks and panicking, resolve the install server
to a literal IP because casper mounts the live filesystem with klibc's nfsmount which
has no resolver, and add toram so casper copies the squashfs into RAM and unmounts the
NFS source. That last one is what lets the node reboot at all: with the NFS root still
mounted, systemd-shutdown waits forever on an lvm/pvscan wedged in uninterruptible I/O
on it and the node never power-cycles into the disk it just installed. casper has no
cmdline knob for NFS mount options -- it parses only nfsroot= and takes the whole value
as the path -- so toram is its supported way to avoid a network root.

Write the installer's resolv.conf nameserver as an IP. glibc's resolver discards a
hostname given on a nameserver line, so the xcatmaster name left the installer, and
the in-target apt that inherits the file, with no DNS at all.

Add the online archive through apt `sources:` on classic-sources releases, where
Subiquity renders the target sources.list from the install media alone and in-target
apt cannot find packages the ISO does not carry. Deb822 releases are excluded: their
primary mirror already lands in ubuntu.sources, so legacy .list files would configure
the same suites twice.

Flip the node to local-disk boot from the live installer over bash's /dev/tcp instead
of relying on updateflag.awk, which needs gawk's |& coprocess while Ubuntu's
/usr/bin/awk is mawk. The exchange is checked, and a failure is recorded in the
install log rather than silently PXE-looping into another install.

Defer syncfiles to the postbootscripts on the diskful install path, so it runs on the
booted node with sshd up rather than inside the in-target chroot where the MN cannot
reach it.

Make the test harness's provision wait overridable through WAIT_FOR_PROVISION; the
default stays short so a boot loop still fails fast.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-24 15:41:32 -03:00
Vinícius Ferrão 24e2c98957 style(statelite): align image cache assignments 2026-07-14 19:11:28 -03:00
Vinícius Ferrão aa086a1bc9 feat(statelite): support NFS root mount options 2026-07-14 19:04:09 -03:00
Vinícius Ferrão 7b20bbd187 Guard Ubuntu live media package sources 2026-05-05 21:40:04 -03:00
Vinícius Ferrão 1babd7b0e4 fix: improve Ubuntu LTS provisioning support 2026-04-29 18:19:12 -03:00
Samveen e54aabef0e Fix #7433: correct typo in variable name
Signed-off-by: Samveen <samveen@samveen.in>
2024-04-13 12:37:01 +05:30
Mark Gurevich 471fd4d7c0 Support for Ubuntu20.04 legacy OS image 2022-09-14 14:47:04 -04:00
Simon Fowler 55c521a405 Add initial support for deploying Ubuntu 20.04 nodes.
This configures automated installation using the subiquity installer, as
documented at
https://ubuntu.com/server/docs/install/autoinstall-quickstart and other
locations on the Internet.

Installation uses the NFS export of /install, and configures the
installer to use the nocloud-net datasource, creating a per-node
directory containing the processed template file as the user-data file,
and an empty meta-data file.

Kernel and initrd files are pulled from the casper/ directory under the
package dir.

Unnecessary elements of the kernel command line have been removed in the
subiquity installer path.

Support has been added for selecting a subiquity specific default
template, as well as an updated pre-install script and some minor POSIX
shell compliance fixes for the getinstdisk script.
2021-12-13 11:54:49 +11:00
yangsbj 3402de0969 site.httpport for ubuntu diskless support 2018-12-17 04:03:38 -05:00
yangsong 7a18f5beee fix issue Function "httpport" can not work on ubuntu + netboot=grub2 scenario #5869 (#5871)
* support site.httpport in ubuntu diskless

* fix issue Function httpport can not work on ubuntu + netboot=grub2 scenario #5869
2018-12-13 14:38:55 +08:00
yangsong 01541aba74 correct several issues on site.httpport in diskless provision (#5774) 2018-11-07 18:19:35 +08:00
yangsbj 5d90a4212c change HTTPPORT in /proc/cmdline to XCATHTTPPORT to avoid potential confilic 2018-11-04 21:54:30 -05:00
yangsbj 1fb78eb97d add HTTPPORT=xxx in kcmdline for diskless/statelite 2018-11-02 05:00:26 -04:00
yangsbj 1889ec879d support site.httpport in nodeset and mknb 2018-11-01 23:29:01 -04:00
bybai 3067412a7f nodeset ubuntu16.04.5 x86_64 support 2018-10-26 02:33:57 -04:00
GONG Jie 04f6e3b344 Remove trailing spaces in file xCAT-server/lib/xcat/plugins/debian.pm 2017-12-31 23:59:59 +00:00
Gᴏɴɢ Jie b63a0aa4ae Fix $kernelpath for Ubuntu 18.04 on ppc64el (#5342) 2018-06-27 16:46:52 +08:00
Gᴏɴɢ Jie dbeac84fd7 For Ubuntu 18.04 support, search a different place for Linux kernel and initrd (#5322) 2018-06-25 20:52:45 +08:00
Jarrod Johnson c5342b7fc6 Prefer HWE netboot where available in Ubuntu (#5195) 2018-05-15 14:37:28 +08:00
Bin Xu d447882fd5 Adjust the server used for kernel/initrd and imgurl for petitboot (#4416)
- URL for kernel/initrd, get the value from below value tftpserver -> xcatmaster -> myipfn
 - URL for image, get the value from below value nfsserver -> tftpserver -> xcatmaster -> myipfn
2017-12-13 18:14:04 +08:00
Bin Xu da60d783d0 1, make the error as node level error in sles/debian plugin so that nodeset can know which are the failure nodes (#4122)
2, using global variable for failurenodes in grub2 plugin
2017-10-19 03:09:33 -05:00
chenglch 3408e93e6b Do not query noderes table in subvars subroutine
This patch refactor the interface to get xcatmaster and tftpserver
attributes in the subvars subroutine to improve the performance.

partial-issue: #3958
2017-09-25 16:33:23 +08:00
immarvin e7e18f46b6 fix issue [FVT]:rmimage output is not consistent on rhels and sles/ubuntu #3783 2017-08-28 04:21:49 -04:00
chenglch 1f1f2ae5f1 Fix typo error in mknetboot when refactoring bootparams 2017-02-21 09:33:52 +08:00
chenglch 97f9d4da8f Do not update bootparams table when running nodeset
With the nytprof tool, the buttleneck is the time to update the bootparams
table.To optimize the performance on large scale nodes, this patch tranfer
the bootparams hash through variable reference.

posible impact: getdestiny can not get the information about bootparams.

partial-issue: #2024
2016-12-23 13:45:20 +08:00
immarvin 72f66aed71 fix [fvt] nodeset node diskless image failed for could not find the diskless image #2188 2016-11-22 02:59:09 -05:00
immarvin 907c4971a9 fix issue [CUSTOMER] the old diskless image built by xCAT can not be used after xcat 2.12.2 #2130 2016-11-17 03:31:30 -05:00
Jarrod Johnson 967dd0f5fb Fix Debian and SLES rootimg.gz compatibility
Do not require repacking of a rootimage if the
environment has the 'old style' packed image.
2016-11-09 11:24:58 -05:00
immarvin b9d8138395 fix issue Nodeset for Ubuntu OS displays warning, but we should be more specific and only print on conditions where it might fail #1097 2016-08-12 02:52:03 -04:00
penguhyang 79426ad21e add new option to indicate compress method (#1669) 2016-08-11 03:09:43 -05:00
penguhyang 5cd203cdf5 enhance packimage -m txc (#1602) 2016-08-02 16:45:31 +08:00
Mark Gurevich 0a3fbd8d51 perltidy all perl files 2016-07-20 11:40:27 -04:00
penguhyang 5d46d48f6a Fix issue of packimage -m txc (#1554)
* redefine the code to make distint

* fix issue of packimage -m txc
2016-07-20 07:06:33 -05:00
penguhyang f6543e8390 fix #1083, ubuntu, diskless, enable the diskless installation log can be forwarded to the MN 2016-06-16 03:08:46 -04:00
zet809 c026cfed79 Update debian.pm 2016-02-23 15:32:06 +08:00
zet809 c41a3e54e3 Update debian.pm 2016-02-23 14:41:21 +08:00
ertaozh 1e37705726 add getinstdisk as the default getdisk script for ubuntu 2016-02-16 02:11:20 -05:00
penguhyang 4cf7ac6aaf correct the cluster.log show doing debian copycds 2015-10-30 02:24:40 -04:00
huweihua a81a5e1a45 fix the indent issue and combine trace message 2015-08-18 04:11:59 -04:00
huweihua a35ca71281 add trace information 2015-08-13 23:31:30 -04:00
immarvin dcbc16a5ab fix defect #4743 [fvt]2.10:after diskless provision could not log in compute node without passord 2015-07-13 04:39:12 -04:00
immarvin db8a4dd07d donot create statelite osimages and diskless service osimages after copycds, 2015-06-02 02:02:40 -04:00
ligc cc4dbdf8a3 change the nodeset install/netboot/statelite message from warning to error, and then exit 2015-05-11 04:51:13 -04:00
immarvin faabb8e54b merge 2015-04-30 04:10:12 -04:00
immarvin ffaa44b437 support partitionscript in ubuntu 2015-04-27 22:31:59 -04:00
Victor Hu 21caa0d9b9 Bug #4585, in the debian.pm code when we are looking at the pkgdir
directories, the last one was being used.  However, the first one
on the list should be used per man page:

"The first path in the value of osimage.pkgdir must be
the OS base pkg dir path,..."

Fixing to use the first directory specified.

Also fixed a bunch for formatting, space, tab issues...
2015-03-04 14:40:40 -05:00
daniceexi 32753450ae defect 4580: a minor change for the syntax 2015-03-02 21:30:51 -05:00
Victor Hu 30f6a66814 Bug #4518 - extra slash in the symlink when -p option is presented
For sles.pm, clean up the $path variable to remove multiple slash
and trailing slash.

In debian.pm , move the check for -p and -w further down so it does
not appear unless we have decided that debian is the image we are
copying.  The message is misleading when copycds is run for non
ubuntu/debian OSes
2015-03-02 12:38:28 -05:00