Comments (7)
The line in grub.py
you are addressing is present as of 3.3.0. The file was last changed three years ago. As such it is unlikely that this is caused by an upgrade from 3.3.3 to 3.3.4.
from cobbler.
I think the change that is causing the issue is in tftpgen.py on line 777, which was introduced in a pull request a few months ago. In 3.3.3 the kernel path was just taken as is, and in 3.3.4 an additional check was added and the call to the parse_grub_remote_file function.
from cobbler.
@rdswett it would be cool if you could link the PR. In any case I will see what I can do about your bug in the coming weeks.
from cobbler.
Git claims it is this one #3477, thanks for looking into it!
from cobbler.
@tpw56j if you have the time I would be thrilled if you could take a look at this bug.
from cobbler.
I tested.
# cobbler distro add --name=distro_test1 --remote-boot-kernel='http://192.168.0.2/vmlinuz' \
--remote-boot-initrd='http://192.168.0.2/initrd.img' --breed=redhat --os-version=rhel9
# cobbler distro report --name=distro_test1
Name : distro_test1
Architecture : x86_64
Automatic Installation Template Metadata : {}
TFTP Boot Files : {}
Boot loaders : <<inherit>>
Breed : redhat
Comment :
Fetchable Files : {}
Initrd :
Kernel :
Kernel Options : {}
Kernel Options (Post Install) : {}
OS Version : rhel9
Owners : <<inherit>>
Redhat Management Key : <<inherit>>
Remote Boot Initrd : http://192.168.0.2/initrd.img
Remote Boot Kernel : http://192.168.0.2/vmlinuz
Template Files : {}
# cobbler profile add --name=profile_test1 --distro=distro_test1
Correct grub menu with loading via http:
menuentry 'profile_test1' --class gnu-linux --class gnu --class os {
echo 'Loading kernel ...'
clinux (http,192.168.0.2)/vmlinuz inst.ks.sendmac inst.ks=http://192.168.122.1/cblr/svc/op/autoinstall/profile/profile_test1
echo 'Loading initial ramdisk ...'
cinitrd (http,192.168.0.2)/initrd.img
echo '...done'
}
But using the hostname does result in an error:
cobbler distro add --name=distro_test2 --remote-boot-kernel='http://www.example.com/vmlinuz' \
--remote-boot-initrd='http://192.168.0.2/initrd.img' --breed=redhat --os-version=rhel9
exception on server: Invalid remote file format http://www.example.com/vmlinuz
www.example.com is not a valid IP address
File "/usr/lib/python3.12/site-packages/cobbler/remote.py", line 3928, in _dispatch
return method_handle(*params)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/cobbler/remote.py", line 2135, in xapi_object_edit
self.modify_item(object_type, handle, key, value, token) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/cobbler/remote.py", line 1862, in modify_item
setattr(obj, attribute, arg)
File "/usr/lib/python3.12/site-packages/cobbler/items/item.py", line 371, in __setattr__
super().__setattr__(name, value)
File "/usr/lib/python3.12/site-packages/cobbler/items/distro.py", line 312, in remote_boot_kernel
parsed_url = grub.parse_grub_remote_file(remote_boot_kernel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/cobbler/grub.py", line 41, in parse_grub_remote_file
raise ValueError(
Maybe we should remove the IP address check in grub.py?
from cobbler.
Hm... I am not 100% sure if that is the right way as we rebuild the URL for remote boot purposes. As such having a valid hostname or IP is desirable in my eyes.
from cobbler.
Related Issues (20)
- Make use of libosinfo to import distros HOT 1
- Cobbler rejects InfiniBand MAC addresses
- Unable to set Hw RAID-1 DM config on User-Data HOT 1
- [Backport] Add support for cnames in dnsmasq
- Debian build failes because missing dependency: python3-yaml
- Docs: Improve OS installation debugging sections HOT 1
- anamon aborts with 'bytes' object has not attribute 'data'
- Lazy start is useless when there are a large number of systems HOT 1
- Windows import cannot be performed when using package "file" version lower than 5.37
- RFE: Allow specifying the virtual machine type HOT 1
- support sn HOT 5
- [debian] cobbler expects grub2-mkimage on debian, but debian has grub-mkimage only HOT 1
- [debian] cobbler check expects systemd unit named "dhcpd.service" but debian uses "isc-dhcp-server.service"
- [debian] cobbler sync generated dhcpd.conf tries to run isc-dhcp-server but debian uses /usr/sbin/dhcpd
- `setuptools.dep_util` is deprecated and will be removed soon. Alternative suggested in `setuptools.modified`.
- RecursionError when parent and child are having the same name
- Use new signatures URL in libcobblersignatures
- [Backport] Fix for proxy_url_ext
- `ks_meta` is being returned as a dictionary HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobbler.