Jira (PUP-4429) Puppet command line tools accept partial matches for flags without altering behavior

3 views
Skip to first unread message

Charlie Sharpsteen (JIRA)

unread,
Apr 16, 2015, 5:35:49 PM4/16/15
to puppe...@googlegroups.com
Charlie Sharpsteen created an issue
 
Puppet / Bug PUP-4429
Puppet command line tools accept partial matches for flags without altering behavior
Issue Type: Bug Bug
Affects Versions: PUP 3.7.5, PUP 4.0.0
Assignee: Kylo Ginsberg
Components: Client
Created: 2015/04/16 2:35 PM
Labels: redmine
Priority: Normal Normal
Reporter: Charlie Sharpsteen

The Puppet command line tools will accept partial matches for flags, but do not use the values provided. This causes unexpected behavior when a command accepts a flag or type but doesn't actually act upon it.

Reproduction Case

Install Puppet 3.7.x or 4.0.x.

Execute config print commands with flags that affect settings, such as puppet agent -

no-daemonize --configprint daemonize with various truncations of the -no-daemonize flag.

Outcome

Partial matches are accepted, but don't alter the setting value:

puppet agent --no-daemon --configprint daemonize
true
 
puppet agent --no-daemoniz --configprint daemonize
true
 
# Correct behavior when flag is fully specified.
puppet agent --no-daemonize --configprint daemonize
false

Expected Outcome

The Puppet command line interface should treat partial flags the same way as missing flags and throw an 'invalid option' error:

puppet agent --no-daemon
Error: Could not parse application options: invalid option: --no-daemon

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Atlassian logo

Kylo Ginsberg (JIRA)

unread,
Apr 17, 2015, 2:20:46 AM4/17/15
to puppe...@googlegroups.com

Kylo Ginsberg (JIRA)

unread,
Apr 17, 2015, 2:21:45 AM4/17/15
to puppe...@googlegroups.com

Kylo Ginsberg (JIRA)

unread,
Apr 17, 2015, 2:21:46 AM4/17/15
to puppe...@googlegroups.com
Kylo Ginsberg commented on Bug PUP-4429
 
Re: Puppet command line tools accept partial matches for flags without altering behavior

We should consider this ticket in any plans to work on the puppet CLI.

Kylo Ginsberg (JIRA)

unread,
Apr 17, 2015, 2:21:48 AM4/17/15
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Apr 17, 2015, 7:36:46 AM4/17/15
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
The Puppet command line tools will accept partial matches for flags, but do not use the values provided. This causes unexpected behavior when a command accepts a flag or type but doesn't actually act upon it.

h2. Reproduction Case


Install Puppet 3.7.x or 4.0.x.

Execute {{config print}} commands with flags that affect settings, such as {{puppet agent  \  --no-daemonize  \  --configprint daemonize}} with various truncations of the {{ \ --no-daemonize}} flag.

h3. Outcome


Partial matches are accepted, but don't alter the setting value:

{noformat}

puppet agent --no-daemon --configprint daemonize
true

puppet agent --no-daemoniz --configprint daemonize
true

# Correct behavior when flag is fully specified.
puppet agent --no-daemonize --configprint daemonize
false
{noformat}

h3. Expected Outcome


The Puppet command line interface should treat partial flags the same way as missing flags and throw an 'invalid option' error:

{noformat}

puppet agent --no-daemon
Error: Could not parse application options: invalid option: --no-daemon
{noformat}

Josh Cooper (JIRA)

unread,
Apr 22, 2015, 6:04:02 PM4/22/15
to puppe...@googlegroups.com

Kylo Ginsberg (JIRA)

unread,
May 31, 2016, 3:07:04 PM5/31/16
to puppe...@googlegroups.com
Kylo Ginsberg updated an issue
Change By: Kylo Ginsberg
Labels: cli  redmine
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Kylo Ginsberg (JIRA)

unread,
May 31, 2016, 3:07:05 PM5/31/16
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Apr 6, 2017, 3:19:03 PM4/6/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 4.y
Fix Version/s: PUP 5.y
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Rob Browning (JIRA)

unread,
May 15, 2017, 6:38:03 PM5/15/17
to puppe...@googlegroups.com

Rob Browning (JIRA)

unread,
May 15, 2017, 6:39:03 PM5/15/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:45:59 PM5/18/17
to puppe...@googlegroups.com

Charlie Sharpsteen (Jira)

unread,
Aug 26, 2022, 2:09:02 PM8/26/22
to puppe...@googlegroups.com
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Charlie Sharpsteen (Jira)

unread,
Aug 26, 2022, 2:09:03 PM8/26/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages