Bug 1065674
Summary: | RFE: extend anaconda addon API to allow additional arguments on %addon line | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | David Shea <dshea> | ||||||||
Component: | anaconda | Assignee: | David Shea <dshea> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 7.0 | CC: | atodorov, borgan | ||||||||
Target Milestone: | rc | Keywords: | FutureFeature | ||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | anaconda-19.31.82-1 | Doc Type: | Enhancement | ||||||||
Doc Text: |
Feature:
Add support for arguments to the kickstart %addon command.
Reason:
More flexible addons.
Result:
You can now use addon commands like %addon org_fedora_hello_word --reverse-text --text-color="blue"
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-03-05 13:57:56 UTC | 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: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 1070558, 1115914, 1116335, 1118527, 1118529, 1176483 | ||||||||||
Attachments: |
|
Description
David Shea
2014-02-15 17:33:54 UTC
With anaconda-19.31.109-1 and exactly the same section in my ks.cfg
> %addon org_fedora_hello_word --reverse-text --text-color="blue"
> Text goes here
> %end
>
I get an error before stage2 loads the UI:
The following problem occured on line 22 of the kickstart file:
Unhandled arguments on %addon line for org_fedora_hello_world
Looking at the addon code it does have a --reverse option but even with %addon org_fedora_hello_word --reverse Text goes here %end I get the same error so moving back to ASSIGNED for more info. Created attachment 961138 [details]
anaconda.log
Created attachment 961139 [details]
program.log
Created attachment 961140 [details]
syslog
I think I'm seeing the same error as in bug #1155955 which is fixed in 19.31.110 Is the addon loaded? I don't see a traceback. (In reply to David Shea from comment #8) > Is the addon loaded? I don't see a traceback. I think this happens before it is loaded, while anaconda does ks.cfg parsing just before loading stage2 GUI. I will provide more info once anaconda 19.31.110-1 becomes available for testing. Tested with anaconda 19.31.111-1 and the resulting file /root/hello_world_addon_output.txt is now present but empty. I need to see if this addon is still functioning correctly. (In reply to Alexander Todorov from comment #3) > %addon org_fedora_hello_word --reverse You forgot an l (word -> world) It does look like there's a bug in the addon related to creating the anaconda-ks.cfg file, though, so you may end up with a line %addon org_fedora_hello_world--reverse with no spaces. I'll send a pull request for that. (In reply to David Shea from comment #11) > (In reply to Alexander Todorov from comment #3) > > %addon org_fedora_hello_word --reverse > > You forgot an l (word -> world) > OK, tried with correct syntax this time. I got the resulting /root/hello_world_addon_output.txt file, containing the text: hello world It was not reversed however. > It does look like there's a bug in the addon related to creating the > anaconda-ks.cfg file, though, so you may end up with a line > > %addon org_fedora_hello_world--reverse > > with no spaces. I'll send a pull request for that. Also add a newline at the end. My resulting anaconda-ks.cfg is: %addon org_fedora_hello_world--reverse hello world %end%addon com_redhat_kdump --enable --reserve-mb='auto' %end where I didn't specify the kdump addon in the original ks.cfg. (In reply to Alexander Todorov from comment #12) > (In reply to David Shea from comment #11) > > (In reply to Alexander Todorov from comment #3) > > > %addon org_fedora_hello_word --reverse > > > > You forgot an l (word -> world) > > > > OK, tried with correct syntax this time. I got the resulting > /root/hello_world_addon_output.txt file, containing the text: > hello world > > > It was not reversed however. The reversal is just in the display on the summary hub. If you use an incomplete kickstart it should show up in status reversed. It won't be reversed in the outputed kickstart, since if you had --reverse with reversed text that would be double reversed. > > It does look like there's a bug in the addon related to creating the > > anaconda-ks.cfg file, though, so you may end up with a line > > > > %addon org_fedora_hello_world--reverse > > > > with no spaces. I'll send a pull request for that. > > Also add a newline at the end. My resulting anaconda-ks.cfg is: > > %addon org_fedora_hello_world--reverse > hello world > %end%addon com_redhat_kdump --enable --reserve-mb='auto' > > %end Yep. https://github.com/vpodzime/hello-world-anaconda-addon/commit/491bdcf10a7fdd9aa798454e49d2b37ae8991ab7 > where I didn't specify the kdump addon in the original ks.cfg. It gets loaded since it's on the installation media. Ok, my copy of this addon didn't do anything useful with the --reverse option. I've modified it to indicate that it was used and can now verify the original issue. David, in which version do you expect to have the space/newline issue fixed? Do you need me to open another bug for that ? (In reply to David Shea from comment #13) > Yep. > https://github.com/vpodzime/hello-world-anaconda-addon/commit/ > 491bdcf10a7fdd9aa798454e49d2b37ae8991ab7 > OK great. Moving to VERIFIED then. The space/newline issue is a problem in the hello world addon. The addon itself outputs its string representation, and besides getting the %addon line right it's expected to put a newline at the end. It's been fixed. 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, 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://rhn.redhat.com/errata/RHBA-2015-0312.html |