Bug #11932
closed'err': malformed format string - %; (ArgumentError) while performing manual/pxeless discovery workflow
Description
If user selects Manual discovery and define all network/foreman credentials and click on confirm without defining any custom facts then following error appears on console:
/usr/lib64/ruby/vendor_ruby/discovery.rb:38:in 'err': malformed format string - %; (ArgumentError)
tfm-rubygem-foreman_discovery-4.1.0-1.fm1_10.git.56.4380f1d.git.56.4380f1d.git.56.4380f1d.el7.noarch
discovery-image fdi-bootable-3.0.1.iso
foreman-release-1.10.0-0.develop.201509171905gitd7b8c7a.el7.noarch
Files
Updated by Sachin Ghai over 9 years ago
I think real cause of this issue is when user defines the network configuration like gw/dns then same IP appears on next screen for foreman_URL.
ex: let's say I defined gw/dns like 192.168.100.1/24 then same appears on next screen (Foreman Credentials) under Foreman URL: https://192.168.100.1/24
here are the suggestions:
1) Either we should leave the 'Foreman URL" field auto blank
2) Or we should validate the URL and raise appropriate error.
Updated by Sachin Ghai over 9 years ago
- Related to Tracker #10294: PXEless discovery feature added
Updated by Lukas Zapletal over 9 years ago
You are right, my thinking was to pre-populate the field if nothing was provided via kernel command line. Forgot about CIDR format. I think it is misleading to fill it from gateway, I will remove that behavior.
Updated by Lukas Zapletal over 9 years ago
Oh do not use CIDR notation for GW/DNS, only for IP address. I am unable to reproduce this one. Even when I enter "/24" in all fields and also keep the incorrect http://IP:3000/24 then I get only failure (but not the error about the invalid syntax).
Updated by Lukas Zapletal over 9 years ago
It looks like Ruby misinterprets "%" character, have you typed in "%" somewhere in the process?
Updated by Sachin Ghai over 9 years ago
Yeah.. I'm not using CIDR notation for GW/DNS. It was just to see the effect if I use a invalid/blank/random IP etc. Reported issue appeared on specifying Foreman URL: https://192.168.100.1/24
I'll reproduce it again.
Updated by Lukas Zapletal over 9 years ago
Attached a patch that solves malformed strings for syslog. That should solve this. Removed auto-population of foreman URL from Gateway (misleading) as part of #11946 patch.
Updated by Lukas Zapletal over 9 years ago
- Related to Bug #11946: Confirm button misspelled on custom facts screen added
Updated by Lukas Zapletal over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman-discovery-image/pull/27 added
- Pull request deleted (
)
Updated by Lukas Zapletal over 9 years ago
- Status changed from Ready For Testing to Resolved
- Assignee set to Lukas Zapletal