Jira (PUP-8299) File resource needs "ensure" if source is http url

6 views
Skip to first unread message

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:20:03 AM12/30/17
to puppe...@googlegroups.com
Mariusz Gronczewski updated an issue
 
Puppet / Bug PUP-8299
File resource needs "ensure" if source is http url
Change By: Mariusz Gronczewski
That worked in 4.8.x (the current Debian upstream package):

{{

file { '/tmp/rnd':
    source => 'http://192.168.1.4/rnd',
    mode => "644",
    checksum => "sha256",
    checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed',
    backup => false,
}

}}

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, *HTTP request does not happen*) and debug log returns

{{Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist}}

The same thing with non-http source works just fine 

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{{127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:20:04 AM12/30/17
to puppe...@googlegroups.com
Mariusz Gronczewski created an issue
Issue Type: Bug Bug
Affects Versions: PUP 5.3.3
Assignee: Unassigned
Created: 2017/12/30 2:19 AM
Priority: Normal Normal
Reporter: Mariusz Gronczewski

That worked in 4.8.x (the current Debian upstream package):

{{
file

{ '/tmp/rnd': source => 'http://192.168.1.4/rnd', mode => "644", checksum => "sha256", checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed', backup => false, }

}}

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, HTTP request does not happen) and debug log returns

Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist

The same thing with non-http source works just fine

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{{127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:20:04 AM12/30/17
to puppe...@googlegroups.com
Mariusz Gronczewski updated an issue
Change By: Mariusz Gronczewski
That worked in 4.8.x (the current Debian upstream package):

{{


file { '/tmp/rnd':
    source => 'http://192.168.1.4/rnd',
    mode => "644",
    checksum => "sha256",
    checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed',
    backup => false,
}


}}

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, *HTTP request does not happen*) and debug log returns


{{Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist}}

The same thing with non-http source works just fine 

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{{127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:21:02 AM12/30/17
to puppe...@googlegroups.com

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:21:02 AM12/30/17
to puppe...@googlegroups.com
Mariusz Gronczewski updated an issue
That worked in 4.8.x (the current Debian upstream package):

{ { quote} file { '/tmp/rnd':

    source => 'http://192.168.1.4/rnd',
    mode => "644",
    checksum => "sha256",
    checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed',
    backup => false,
} {quote } }

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, *HTTP request does not happen*) and debug log returns

{{Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist}}

The same thing with non-http source works just fine 

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{{127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:21:02 AM12/30/17
to puppe...@googlegroups.com

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:22:02 AM12/30/17
to puppe...@googlegroups.com
Mariusz Gronczewski updated an issue
That worked in 4.8.x (the current Debian upstream package):

{{
file { '/tmp/rnd':
        source => 'http://192.168.1.4/rnd',
        mode => "644",
        checksum => "sha256",
        checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed',
        backup => false,
}
}}

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, *HTTP request does not happen*) and debug log returns

{{Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist}}

The same thing with non-http source works just fine 

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{{127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:22:02 AM12/30/17
to puppe...@googlegroups.com

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:22:03 AM12/30/17
to puppe...@googlegroups.com
Mariusz Gronczewski updated an issue
That worked in 4.8.x (the current Debian upstream package):


{{file { '/tmp/rnd':
        source => 'http://192.168.1.4/rnd',
        mode => "644",
        checksum => "sha256",
        checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed',
        backup => false,
}
}}  (apparently jira's own wysiwig editor can't preformat above block, I give up)

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, *HTTP request does not happen*) and debug log returns

{{Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist}}

The same thing with non-http source works just fine 

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{{127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:22:03 AM12/30/17
to puppe...@googlegroups.com

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:26:02 AM12/30/17
to puppe...@googlegroups.com

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:26:02 AM12/30/17
to puppe...@googlegroups.com

Mariusz Gronczewski (JIRA)

unread,
Dec 30, 2017, 5:27:02 AM12/30/17
to puppe...@googlegroups.com

Craig Gomes (JIRA)

unread,
Jan 8, 2018, 5:42:04 PM1/8/18
to puppe...@googlegroups.com
Craig Gomes updated an issue
Change By: Craig Gomes
Team: Platform Core

Josh Cooper (JIRA)

unread,
Jan 8, 2018, 6:23:02 PM1/8/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
That worked in 4.8.x (the current Debian upstream package):


{ { code:puppet}
file { '/tmp/rnd':
        source => 'http://192.168.1.4/rnd',
        mode => "644",
        checksum => "sha256",
        checksum_value => '19248907fa84d23721987abf90f9f7cbac44c547fd38ef2c0ce31e194eb4d9ed',
        backup => false,
}
{code }


(apparently jira's own wysiwig editor can't preformat above block, I give up)

After checking with Puppetlab's 5.3.3 that causes nothing (file does not get created, *HTTP request does not happen*) and debug log returns

{ noformat}
{ { Debug: /Stage[main]/Main/File[/tmp/rnd]: Nothing to manage: no ensure and the resource doesn't exist}}
{noformat}

The same thing with non-http source works just fine 

adding ensure => present to the resource "fixes" it altho for some reason Puppet does 3 HEAD requests to server instead of one...

{ { noformat}
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "HEAD /rnd HTTP/1.1" 200 0 "-" "Ruby"
127.0.0.1 192.168.1.4 - [30/Dec/2017:11:17:08 +0100] "GET /rnd HTTP/1.1" 200 1048576 "-" "Ruby"}}
{noformat}

Josh Cooper (JIRA)

unread,
Mar 15, 2018, 8:14:03 PM3/15/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

unread,
May 19, 2020, 2:46:02 PM5/19/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8299
 
Re: File resource needs "ensure" if source is http url

This is not reproducible in 6.15.0:

# rm -f /tmp/index.html
# puppet apply -e "file { '/tmp/index.html': source => 'https://github.com' }"
Notice: Compiled catalog for filmy-wallop.delivery.puppetlabs.net in environment production in 0.01 seconds
Notice: /Stage[main]/Main/File[/tmp/index.html]/ensure: defined content as '{mtime}2020-05-19 18:44:16 +0000'
Notice: Applied catalog in 0.11 seconds
# file /tmp/index.html
/tmp/index.html: HTML document, UTF-8 Unicode text, with very long lines

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages