8000 [Backport] Cobbler Import fails · Issue #3285 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Backport] Cobbler Import fails #3285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 3 tasks
SchoolGuy opened this issue Nov 30, 2022 · 10 comments · Fixed by #3681
Closed
1 of 3 tasks

[Backport] Cobbler Import fails #3285

SchoolGuy opened this issue Nov 30, 2022 · 10 comments · Fixed by #3681
Assignees
Labels
backport Backported changes and features.
Milestone

Comments

@SchoolGuy
Copy link
Member

Original feature issue

Target release

  • release33
  • release32
  • release30

Reason

Stabilization of 3.2.x for the community.

@SchoolGuy SchoolGuy added the backport Backported changes and features. label Nov 30, 2022
@SchoolGuy SchoolGuy added this to the V3.2.3 milestone Nov 30, 2022
@SchoolGuy SchoolGuy moved this to Todo in Cobbler Server Nov 30, 2022
@SchoolGuy SchoolGuy changed the title [Backport] Your title [Backport] Cobbler Import fails Nov 30, 2022
@emyr666
Copy link
emyr666 commented Dec 7, 2022

I have version 3.2.2 . I get a signature error when trying to import almalinux9.0. It's in the rhel9 breed. I did 'cobbler sgnature update' and it gets https://cobbler.github.io/signatures/3.0.x/latest.json. I then do 'cobbler signature reload' and it says

There was an error loading the signature data in .
Please check the JSON file or run 'cobbler signature update'.

I copied the laest signature file from github to /var/lib/cobbler/distro_signatures.json. Again i get an error when doing 'cobbler signature reload' but when I restart cobblerd redhat9 now appears. i still can't import almalinux though. i get

No signature matched in /var/www/cobbler/distro_mirror/AlmaLinux9.0-x86_64-minimal
Exception occurred: <class 'cobbler.cexceptions.CX'>
Exception value: 'No signature matched in /var/www/cobbler/distro_mirror/AlmaLinux9.0-x86_64-minimal'
Exception Info:
  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 98, in run
    rc = self._run(self)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 286, in runner
    self.logger

  File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 1476, in import_tree
    import_module.run(path, mirror_name, network_root, autoinstall_file, arch, breed, os_version)

  File "/usr/lib/python3.6/site-packages/cobbler/modules/managers/import_signatures.py", line 195, in run
    raise CX(error_msg)

!!! TASK FAILED !!!

I am using CentOS Linux release 8.5.2111 and Cobbler 3.2.2 is all I'm offered to install by yum. I don't mind building and installing from source but am worried that is going to break my setup.

@picogeyer
Copy link

@emyr666 You can normally see a more detailed error in /var/log/cobbler/cobbler.log

@emyr666
Copy link
emyr666 commented Dec 10, 2022

This is all that appears in /var/log/cobbler/cobbler.log

2022-12-10T10:49:52 - DEBUG | REMOTE CLI Authorized; user(?)
2022-12-10T10:49:52 - INFO | REMOTE start_task(Media import); event_id(2022-12-10_104952_import); user(?)
2022-12-10T10:49:53 - INFO | import_tree; ['/mnt/iso', 'AlmaLinux9.0-x86_64-minimal', None, None, None]
2022-12-10T10:49:53 - INFO | importing from a network location, running rsync to fetch the files first
2022-12-10T10:49:53 - INFO | running: rsync -a  '/mnt/iso/' /var/www/cobbler/distro_mirror/AlmaLinux9.0-x86_64-minimal --progress
2022-12-10T10:49:53 - INFO | received on stdout: sending incremental file list

2022-12-10T10:49:53 - DEBUG | received on stderr: 

@emyr666
Copy link
emyr666 commented Dec 10, 2022

Got to the bottom of it. The signature file needs to have "Minimal" added to the rhel9 signatures list since the minimal iso for Alma has the Packages directory under a folder called Minimal not one called BaseOS.

  "rhel9": {
    "signatures": [
      "BaseOS",
      "Minimal"
    ],

@picogeyer
Copy link
picogeyer commented Dec 11, 2022

I believe importing the minimal versions of an ISO is not yet supported:
#2623

Have you tried the full image?

@emyr666
Copy link
emyr666 commented Dec 12, 2022

No I have not tried the full image because I only want the minimal one. Anyway, with the change I suggest above it works fine.

@emyr666
Copy link
emyr666 commented Dec 12, 2022

Looking at that bug report, I think the exact same fix will solve it. I.e just add 'Minimal' to the signatures list.

@SchoolGuy SchoolGuy moved this from Todo to In Progress in Cobbler Server May 1, 2023
@SchoolGuy SchoolGuy self-assigned this May 1, 2023
@NileshChandekar
Copy link
NileshChandekar commented Mar 8, 2024

Cobbler Server Details:

Rocky Linux release 8.9 (Green Obsidian)
[root@localhost rhel9-x86_64]# cobbler --version
Cobbler 3.2.2
  source: ?, ?
  build time: Wed Apr  5 15:54:53 2023
[root@localhost rhel9-x86_64]# 
  • OK, so after some investigation identify that,
  • cobbler import is failing due to
  • not having the proper dir structure.
[root@localhost distro_mirror]# cobbler import --arch=x86_64  --path=/mnt --name=rhel9
task started: 2024-03-08_075202_import
task started (id=Media import, time=Fri Mar  8 07:52:02 2024)
running python triggers from /var/lib/cobbler/triggers/task/import/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/import/pre/*
shell triggers finished successfully
Found a candidate signature: breed=suse, version=opensuse15.0
Found a candidate signature: breed=suse, version=opensuse15.1
Found a candidate signature: breed=suse, version=opensuse15.2
Found a candidate signature: breed=suse, version=opensuse15.3
Found a candidate signature: breed=suse, version=opensuse15.4
Found a candidate signature: breed=suse, version=sles15generic
No signature matched in /var/www/cobbler/distro_mirror/rhel9-x86_64
Exception occurred: <class 'cobbler.cexceptions.CX'>
Exception value: 'No signature matched in /var/www/cobbler/distro_mirror/rhel9-x86_64'
Exception Info:
  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 98, in run
    rc = self._run(self)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 286, in runner
    self.logger

  File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 1476, in import_tree
    import_module.run(path, mirror_name, network_root, autoinstall_file, arch, breed, os_version)

  File "/usr/lib/python3.6/site-packages/cobbler/modules/managers/import_signatures.py", line 195, in run
    raise CX(error_msg)

!!! TASK FAILED !!!
[root@localhost distro_mirror]# 
[root@localhost distro_mirror]# ls -lhrt /var/www/cobbler/distro_mirror/rhel9-x86_64/
total 4.0K
drwxrwxr-x 2 root root 4.0K Apr 13  2023 isolinux
drwxrwxr-x 3 root root   18 Apr 13  2023 EFI
drwxrwxr-x 3 root root   59 Apr 13  2023 images
[root@localhost distro_mirror]# 
  • Checking the signature
      "rhel9": {
        "signatures": [
          "BaseOS"
  • Do not see BaseOS dir in the distros.

  • RHEL-9 do not have minimal iso

  • RHEL-9 comes with 2 iso:-

    • boot.iso
    • dvd.iso
  • boot.iso do not have BaseOS or Minimal dir structure.

WORKAROUND

  • Mount DVD and Copy
  • BaseOS and Minimal dir.
  • Import should work
[root@localhost rhel9-x86_64]# ls
BaseOS  EFI  images  isolinux  minimal
[root@localhost rhel9-x86_64]# 
[root@localhost rhel9-x86_64]# cobbler import --arch=x86_64  --path=/mnt --name=rhel9
task started: 2024-03-08_080347_import
task started (id=Media import, time=Fri Mar  8 08:03:47 2024)
running python triggers from /var/lib/cobbler/triggers/task/import/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/import/pre/*
shell triggers finished successfully
Found a candidate signature: breed=redhat, version=rhel8
Found a candidate signature: breed=redhat, version=rhel9
Found a matching signature: breed=redhat, version=rhel9
Adding distros from path /var/www/cobbler/distro_mirror/rhel9-x86_64:
creating new distro: rhel9-x86_64
trying symlink: /var/www/cobbler/distro_mirror/rhel9-x86_64 -> /var/www/cobbler/links/rhel9-x86_64
creating new profile: rhel9-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/distro_mirror/rhel9-x86_64 for rhel9-x86_64
processing repo at : /var/www/cobbler/distro_mirror/rhel9-x86_64/BaseOS
directory /var/www/cobbler/distro_mirror/rhel9-x86_64/BaseOS is missing xml comps file, skipping
processing repo at : /var/www/cobbler/distro_mirror/rhel9-x86_64/minimal
directory /var/www/cobbler/distro_mirror/rhel9-x86_64/minimal is missing xml comps file, skipping
*** TASK COMPLETE ***
[root@localhost rhel9-x86_64]#

@opoplawski
Copy link
Contributor

@NileshChandekar I'm assuming your tests were with the RHEL9 boot ISO, which is simply not supported (yet?) in cobbler. I would suggest filing a separate request for that. I'll just note that after playing with this myself some yesterday, I'm not sure it really possible to make use of an imported RHEL boot ISO. Install will fail because there is no .treeinfo or repositories defined. I was able to hack that up manually as well, but I'm not sure that is something that cobbler really should support itself.

@SchoolGuy SchoolGuy linked a pull request Apr 9, 2024 that will close this issue
12 tasks
@SchoolGuy SchoolGuy linked a pull request Apr 16, 2024 that will close this issue
12 tasks
@SchoolGuy
Copy link
Member Author

This is fixed for a good while now.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Cobbler Server May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Backported changes and features.
Projects
Status: Done
5 participants
0