Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2272114 - Error undefined method `repository_url' when tryinfg to use composed images for system deployments in Red Hat Satellite 6
Summary: Error undefined method `repository_url' when tryinfg to use composed images f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.14.2
Hardware: All
OS: All
high
high
Target Milestone: 6.14.4
Assignee: Ian Ballou
QA Contact: sganar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-28 21:11 UTC by Odilon Sousa
Modified: 2024-04-29 11:23 UTC (History)
10 users (show)

Fixed In Version: rubygem-katello-4.9.0.24-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2269386
Environment:
Last Closed: 2024-04-29 11:23:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37268 0 High Closed Error undefined method `repository_url' when trying to use composed images for system deployments 2024-03-28 21:11:39 UTC
Red Hat Issue Tracker SAT-24287 0 None None None 2024-03-28 21:14:02 UTC
Red Hat Product Errata RHBA-2024:2099 0 None None None 2024-04-29 11:23:48 UTC

Comment 1 sganar 2024-04-15 15:33:19 UTC
FaliedQA

Tested on Satellite 6.14.4 Snap 1.0
rubygem-katello-4.9.0.24-1.el8sat.noarch

Steps followed: 
1. Configure the Satellite for provisioning
2. Create a custom product, create a file repository
3. Upload the ISO to the file repository, create a CV, add the repo to the CV and publish it
4. Provision a host with `kickstart_liveimg` parameter with its value similar to `custom/custom_product/custom_liveimg_repo/RHEL8.iso`
5. Try to render the kickstart template

Observation:
The template rendered successfully with Safemode Enabled/Disabled, However the host provisioning fails when the anaconda installer starts with below error(the ISO was correctly fetched and downloaded):

anaconda 33.16.9.4 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/core/util.py", line 202, in startProgram
    preexec_fn=preexec, cwd=root, env=env, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/core/util.py", line 321, in _run_program
    env_prune=env_prune)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/core/util.py", line 397, in execWithRedirect
    log_output=log_output, binary_output=binary_output)[0]
  File "/usr/lib64/python3.6/site-packages/pyanaconda/core/util.py", line 378, in execInSysroot
    return execWithRedirect(command, argv, stdin=stdin, root=root)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/payload/live/payload_base.py", line 148, in _create_rescue_image
    util.execInSysroot("systemd-machine-id-setup", [])
  File "/usr/lib64/python3.6/site-packages/pyanaconda/payload/live/payload_base.py", line 139, in install
    self._create_rescue_image()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/payload/live/payload_liveimg.py", line 292, in install
    super().install()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 456, in run_task
    self._task(*self._task_args, **self._task_kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 490, in start
    self.run_task()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 311, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 311, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 311, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation.py", line 406, in run_installation
    queue.start()
  File "/usr/lib64/python3.6/threading.py", line 885, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 280, in run
    threading.Thread.run(self)
FileNotFoundError: [Errno 2] No such file or directory: 'systemd-machine-id-setup': 'systemd-machine-id-setup'

Comment 3 Ian Ballou 2024-04-16 12:59:00 UTC
@sganar , in the rendered template, you saw liveimg --url=<url> get added to the kickstart file correctly?

If that is the case, I think the "FileNotFoundError: [Errno 2] No such file or directory: 'systemd-machine-id-setup': 'systemd-machine-id-setup'" could potentially be a second bug.

I did find https://bugzilla.redhat.com/show_bug.cgi?id=1963778, which suggests a potential bug with Anaconda.

I think if we can verify that the liveimg --url=<url> line is being added correctly to the kickstart file, that the issue here is resolved but we may need to shift the attention to another BZ. Mostly mentioning this since this issue was more related to Katello than Foreman provisioning.

Comment 4 sganar 2024-04-16 16:01:59 UTC
@iballou , yes the liveimg --url=<url> is populated correctly.

I'll verify this bug since the main issue for which the bug was reported is fixed, and we are hitting another bug related to Anaconda

Comment 5 sganar 2024-04-16 16:03:21 UTC
Verified.

Tested on Satellite 6.14.4 Snap 1.0
rubygem-katello-4.9.0.24-1.el8sat.noarch

Steps followed: 
1. Configure the Satellite for provisioning
2. Create a custom product, create a file repository
3. Upload the ISO to the file repository, create a CV, add the repo to the CV and publish it
4. Provision a host with `kickstart_liveimg` parameter with its value similar to `custom/custom_product/custom_liveimg_repo/RHEL8.iso`
5. Try to render the kickstart template

Observation:
The template rendered successfully with Safemode Enabled/Disabled with liveimg parameter correctly populated
Note: The host provisioning will fail because of this anaconda bug: https://bugzilla.redhat.com/show_bug.cgi?id=1963778

Comment 11 errata-xmlrpc 2024-04-29 11:23:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.14.4 Async Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:2099


Note You need to log in before you can comment on or make changes to this bug.