Bug 2216974
| Summary: | [RFE] Allow the usage of userdata + finish scripts on image based provisioning | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Joniel Pasqualetto <jpasqual> |
| Component: | Provisioning | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | NEW --- | QA Contact: | Satellite QE Team <sat-qe-bz-list> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.12.4 | CC: | satellite6-bugs, shwsingh, sshtein, steven.w-ctr.mercurio |
| Target Milestone: | Unspecified | Flags: | steven.w-ctr.mercurio:
needinfo?
(satellite6-bugs) steven.w-ctr.mercurio: needinfo? (satellite6-bugs) |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Joniel Pasqualetto
2023-06-23 13:28:17 UTC
In my environment we are NOT allowed to install or run cloud-init due to security not allowing it which is the same for DHCP. In this case there seems to be NO way for Sat6 after provisioning to change the hostname or IP which is all I would use userdata for as the rest is post script. What COULD work is for Sat6 to NIT need userdata at all and use the VMware OS customization script to set the IP and hostname just like I do when I create a VM from a template which is the template that Sat6 would be using. Sat6 could even have a tab for customization scripts so Sat6 could create and manage them so it would know exactly what is there to be able to use it. The really ONLY issue I have is the inability to change the IP as even the hostname I could alter in a post script but Sat6 has to be able to get to the VM first. One possible "FIX" also would be if userdata could just do the hostname and IP change then render and push the finish script to a file in /root/ and then set that file to run at boot with the first step in the post script being to remove the setting to run the script at boot. Also part of that could be adding a snippet that sets a desired file name to run at boot with another snippet to remove the setting to run that file at boot and a snippet to render then deploy a script as a file with a given file name that gets marked as executable. This would be a HUGE help as sometimes you want to do a full update then reboot before proceeding and you may need to reboot more than once for a full deployment. The main thing though is just getting the userdata script to cat out the post into a file and either run it or make it run at boot and reboot after userdata has changed the IP (and hostname if possible as well) of the system. Another possabile fix also is to have Sat6 render the post script to a file and put that file on the www space in sat6 then the userdata script changes the hostname/IP, wget's the script to /root/, marks it as exe or runs it with "/usr/bin/bash /root/<script name>" |