Project

General

Profile

Actions

Bug #11932

closed

'err': malformed format string - %; (ArgumentError) while performing manual/pxeless discovery workflow

Added by Sachin Ghai over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

malformed_format.png View malformed_format.png 14.6 KB console screenshot Sachin Ghai, 09/23/2015 05:56 AM
default_url.png View default_url.png 20.5 KB default URL appears based on given gw/dns Sachin Ghai, 09/23/2015 06:45 AM

Related issues 2 (0 open2 closed)

Related to Discovery - Tracker #10294: PXEless discovery featureClosedLukas Zapletal04/28/2015

Actions
Related to Discovery - Bug #11946: Confirm button misspelled on custom facts screen ResolvedLukas Zapletal09/24/2015Actions
Actions #1

Updated by Sachin Ghai over 8 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.

Actions #2

Updated by Sachin Ghai over 8 years ago

Actions #3

Updated by Sachin Ghai over 8 years ago

!!

Actions #4

Updated by Lukas Zapletal over 8 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.

Actions #5

Updated by Lukas Zapletal over 8 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).

Actions #6

Updated by Lukas Zapletal over 8 years ago

It looks like Ruby misinterprets "%" character, have you typed in "%" somewhere in the process?

Actions #7

Updated by Sachin Ghai over 8 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.

Actions #8

Updated by Lukas Zapletal over 8 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.

Actions #9

Updated by Lukas Zapletal over 8 years ago

  • Related to Bug #11946: Confirm button misspelled on custom facts screen added
Actions #10

Updated by Lukas Zapletal over 8 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 ()
Actions #11

Updated by Lukas Zapletal over 8 years ago

  • Status changed from Ready For Testing to Resolved
  • Assignee set to Lukas Zapletal
Actions

Also available in: Atom PDF