mirror of
https://github.com/xcat2/confluent.git
synced 2026-11-13 07:36:59 +00:00
Point out kernel arguments for captured profiles
A diskless boot of a captured profile only gets the profile's kernelargs, not the kernel arguments of the source. Sources relying on some, such as net.ifnames=0 for their interface names, then came up with different interface names than the source and an install to disk of the same image. Say so in the generated profile.yaml and after the capture, and end the file with a newline so appended settings do not run into the kernelargs line.
This commit is contained in:
+5
-1
@@ -285,12 +285,16 @@ def capture_remote(args):
|
||||
label = '{0} {1} ({2})'.format(finfo['name'], finfo['version'], profname)
|
||||
with open(os.path.join(outdir, 'profile.yaml'), 'w') as profileout:
|
||||
profileout.write('label: {}\n'.format(label))
|
||||
profileout.write('kernelargs: quiet installtodisk # remove installtodisk to boot stateless')
|
||||
profileout.write('kernelargs: quiet installtodisk # remove installtodisk to boot stateless\n')
|
||||
profileout.write('# A diskless boot only gets the kernelargs above, not the kernel arguments\n'
|
||||
'# of the source. Add those it relies on and run osdeploy updateboot.\n')
|
||||
subprocess.check_call(['chmod', 'o+r,go-w,a-t', '-R', outdir])
|
||||
subprocess.check_call(['chown', '-R', 'confluent', outdir])
|
||||
sys.stdout.write('Updating boot image... ')
|
||||
sys.stdout.flush()
|
||||
subprocess.check_call(['osdeploy', 'updateboot', profname])
|
||||
print('Note: a diskless boot of {0} only gets the kernelargs in {1}, add kernel '
|
||||
'arguments of the source it relies on there'.format(profname, os.path.join(outdir, 'profile.yaml')))
|
||||
|
||||
|
||||
def capture_system():
|
||||
|
||||
Reference in New Issue
Block a user