Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wget called even if not necessary #54

Closed
fnoop opened this issue Aug 22, 2017 · 3 comments
Closed

wget called even if not necessary #54

fnoop opened this issue Aug 22, 2017 · 3 comments
Labels
bug Something isn't working

Comments

@fnoop
Copy link

fnoop commented Aug 22, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.0.0
  • Ruby: 2.1.4
  • Distribution: Raspbian Jessie (Debian 8)/Ubuntu 16.04
  • Module version: 3.0.0

How to reproduce (e.g Puppet code you use)

class { "::grafana": 
        cfg => {
            app_mode => 'production',
            server   => {
              http_port     => $webport,
              root_url      => "%(protocol)s://%(domain)s:${rootpath}",

            },
      },
      install_method        => "package",
      manage_package_repo   => false,
      package_source        => "https://dl.bintray.com/fg2it/deb-rpi-1b/main/g/grafana_4.3.2_armhf.deb",
    }

What are you seeing

Notice: /Stage[main]/Grafana::Install/Wget::Fetch[grafana]/Exec[wget-grafana]/returns: executed successfully

This is seen on some subsequent runs when package is already installed.

What behaviour did you expect instead

Never to see wget-grafana exec after package is installed

Output log

Any additional information you'd like to impart

So, it seems that puppet-grafana uses wget to download a package before installing into /tmp, then installs from the local location. /tmp is a transient filesystem on some systems(Debian/Ubuntu), so after reboot it is wiped and wget runs again (unnecessarily).
Possible solutions/improvements would be either use a less transient fs like /var/tmp which remains intact after reboot, or better yet wrap the wget in a conditional and only call it if necessary.

@wyardley
Copy link

I think we should get rid of the wget module dependency and use archive for grabbing the file.

@wyardley
Copy link

I think #65 should resolve this.

@fnoop
Copy link
Author

fnoop commented Sep 21, 2017

Works great, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants