sensu / sandbox

The place to get started for new Sensu users
MIT License
21 stars 13 forks source link

Grafana wrong repo config breaks sensu sandbox #43

Closed mpgomez closed 5 years ago

mpgomez commented 5 years ago

The grafana repo config used in the sandbox seems to no longer work

$ ENABLE_SENSU_SANDBOX_PORT_FORWARDING=1 vagrant up
Bringing machine 'sensu-sandbox-x86-64' up with 'virtualbox' provider...
==> sensu-sandbox-x86-64: Importing base box 'bento/centos-7'...
==> sensu-sandbox-x86-64: Matching MAC address for NAT networking...
==> sensu-sandbox-x86-64: Checking if box 'bento/centos-7' is up to date...
==> sensu-sandbox-x86-64: Setting the name of the VM: sensu-sandbox-x86-64
==> sensu-sandbox-x86-64: Clearing any previously set network interfaces...
==> sensu-sandbox-x86-64: Preparing network interfaces based on configuration...
    sensu-sandbox-x86-64: Adapter 1: nat
==> sensu-sandbox-x86-64: Forwarding ports...
    sensu-sandbox-x86-64: 6379 (guest) => 6379 (host) (adapter 1)
    sensu-sandbox-x86-64: 4567 (guest) => 4567 (host) (adapter 1)
    sensu-sandbox-x86-64: 3000 (guest) => 3000 (host) (adapter 1)
    sensu-sandbox-x86-64: 4000 (guest) => 4000 (host) (adapter 1)
    sensu-sandbox-x86-64: 22 (guest) => 2222 (host) (adapter 1)
==> sensu-sandbox-x86-64: Running 'pre-boot' VM customizations...
==> sensu-sandbox-x86-64: Booting VM...
==> sensu-sandbox-x86-64: Waiting for machine to boot. This may take a few minutes...
    sensu-sandbox-x86-64: SSH address: 127.0.0.1:2222
    sensu-sandbox-x86-64: SSH username: vagrant
    sensu-sandbox-x86-64: SSH auth method: private key
    sensu-sandbox-x86-64: Warning: Connection reset. Retrying...
    sensu-sandbox-x86-64: Warning: Remote connection disconnect. Retrying...
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: Vagrant insecure key detected. Vagrant will automatically replace
    sensu-sandbox-x86-64: this with a newly generated keypair for better security.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: Inserting generated public key within guest...
    sensu-sandbox-x86-64: Removing insecure key from the guest if it's present...
    sensu-sandbox-x86-64: Key inserted! Disconnecting and reconnecting using new SSH key...
==> sensu-sandbox-x86-64: Machine booted and ready!
==> sensu-sandbox-x86-64: Checking for guest additions in VM...
==> sensu-sandbox-x86-64: Setting hostname...
==> sensu-sandbox-x86-64: Mounting shared folders...
    sensu-sandbox-x86-64: /vagrant => /home/pilar/code/sandbox/sensu
    sensu-sandbox-x86-64: /vagrant_files => /home/pilar/code/sandbox/sensu/files
==> sensu-sandbox-x86-64: Running provisioner: shell...
    sensu-sandbox-x86-64: Running: /tmp/vagrant-shell20190304-29273-o77cds.sh
    sensu-sandbox-x86-64: storing vagrant env state
    sensu-sandbox-x86-64: Using saved provisioning state:
    sensu-sandbox-x86-64: ENABLE_SENSU_SANDBOX_PORT_FORWARDING=1
    sensu-sandbox-x86-64: SE_USER=
    sensu-sandbox-x86-64: SE_PASS=
    sensu-sandbox-x86-64: Preparing Sensu Core Sandbox
    sensu-sandbox-x86-64: Adding EPEL package repository
    sensu-sandbox-x86-64: warning: /var/tmp/rpm-tmp.JqXan8: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
    sensu-sandbox-x86-64: Retrieving https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
    sensu-sandbox-x86-64: Preparing...                          
    sensu-sandbox-x86-64: ########################################
    sensu-sandbox-x86-64: Updating / installing...
    sensu-sandbox-x86-64: epel-release-7-11                     
    sensu-sandbox-x86-64: ###
    sensu-sandbox-x86-64: ##
    sensu-sandbox-x86-64: #
    sensu-sandbox-x86-64: #####
    sensu-sandbox-x86-64: #############################
    sensu-sandbox-x86-64: Importing GPG keys for package signatures
    sensu-sandbox-x86-64: Installing needed rpm packages with yum
    sensu-sandbox-x86-64: Importing GPG key 0xEBFF1218:
    sensu-sandbox-x86-64:  Userid     : "packagecloud ops (production key) <ops@packagecloud.io>"
    sensu-sandbox-x86-64:  Fingerprint: 6a03 7bb5 2df7 d46d 99dc 59c1 0166 6247 ebff 1218
    sensu-sandbox-x86-64:  From       : https://packagecloud.io/gpg.key
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: Trying other mirror.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:  One of the configured repositories failed (grafana),
    sensu-sandbox-x86-64:  and yum doesn't have enough cached data to continue. At this point the only
    sensu-sandbox-x86-64:  safe thing yum can do is fail. There are a few ways to work "fix" this:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      1. Contact the upstream for the repository and get them to fix the problem.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      2. Reconfigure the baseurl/etc. for the repository, to point to a working
    sensu-sandbox-x86-64:         upstream. This is most often useful if you are using a newer
    sensu-sandbox-x86-64:         distribution release than is supported by the repository (and the
    sensu-sandbox-x86-64:         packages for the previous distribution release still work).
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      3. Run the command with the repository temporarily disabled
    sensu-sandbox-x86-64:             yum --disablerepo=grafana ...
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      4. Disable the repository permanently, so yum won't use it by default. Yum
    sensu-sandbox-x86-64:         will then just ignore the repository until you permanently enable it
    sensu-sandbox-x86-64:         again or use --enablerepo for temporary usage:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --disable grafana
    sensu-sandbox-x86-64:         or
    sensu-sandbox-x86-64:             subscription-manager repos --disable=grafana
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      5. Configure the failing repository to be skipped, if it is unavailable.
    sensu-sandbox-x86-64:         Note that yum will try to contact the repo. when it runs most commands,
    sensu-sandbox-x86-64:         so will have to try and fail each time (and thus. yum will be be much
    sensu-sandbox-x86-64:         slower). If it is a very temporary problem though, this is often a nice
    sensu-sandbox-x86-64:         compromise:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --save --setopt=grafana.skip_if_unavailable=true
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: failure: repodata/repomd.xml from grafana: [Errno 256] No more mirrors to try.
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: There is no installed groups file.
    sensu-sandbox-x86-64: Maybe run: yum groups mark convert (see man yum)
    sensu-sandbox-x86-64: Importing GPG key 0xEBFF1218:
    sensu-sandbox-x86-64:  Userid     : "packagecloud ops (production key) <ops@packagecloud.io>"
    sensu-sandbox-x86-64:  Fingerprint: 6a03 7bb5 2df7 d46d 99dc 59c1 0166 6247 ebff 1218
    sensu-sandbox-x86-64:  From       : https://packagecloud.io/gpg.key
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: Trying other mirror.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:  One of the configured repositories failed (grafana),
    sensu-sandbox-x86-64:  and yum doesn't have enough cached data to continue. At this point the only
    sensu-sandbox-x86-64:  safe thing yum can do is fail. There are a few ways to work "fix" this:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      1. Contact the upstream for the repository and get them to fix the problem.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      2. Reconfigure the baseurl/etc. for the repository, to point to a working
    sensu-sandbox-x86-64:         upstream. This is most often useful if you are using a newer
    sensu-sandbox-x86-64:         distribution release than is supported by the repository (and the
    sensu-sandbox-x86-64:         packages for the previous distribution release still work).
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      3. Run the command with the repository temporarily disabled
    sensu-sandbox-x86-64:             yum --disablerepo=grafana ...
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      4. Disable the repository permanently, so yum won't use it by default. Yum
    sensu-sandbox-x86-64:         will then just ignore the repository until you permanently enable it
    sensu-sandbox-x86-64:         again or use --enablerepo for temporary usage:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --disable grafana
    sensu-sandbox-x86-64:         or
    sensu-sandbox-x86-64:             subscription-manager repos --disable=grafana
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      5. Configure the failing repository to be skipped, if it is unavailable.
    sensu-sandbox-x86-64:         Note that yum will try to contact the repo. when it runs most commands,
    sensu-sandbox-x86-64:         so will have to try and fail each time (and thus. yum will be be much
    sensu-sandbox-x86-64:         slower). If it is a very temporary problem though, this is often a nice
    sensu-sandbox-x86-64:         compromise:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --save --setopt=grafana.skip_if_unavailable=true
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: failure: repodata/repomd.xml from grafana: [Errno 256] No more mirrors to try.
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: Importing GPG key 0xEBFF1218:
    sensu-sandbox-x86-64:  Userid     : "packagecloud ops (production key) <ops@packagecloud.io>"
    sensu-sandbox-x86-64:  Fingerprint: 6a03 7bb5 2df7 d46d 99dc 59c1 0166 6247 ebff 1218
    sensu-sandbox-x86-64:  From       : https://packagecloud.io/gpg.key
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: Trying other mirror.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:  One of the configured repositories failed (grafana),
    sensu-sandbox-x86-64:  and yum doesn't have enough cached data to continue. At this point the only
    sensu-sandbox-x86-64:  safe thing yum can do is fail. There are a few ways to work "fix" this:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      1. Contact the upstream for the repository and get them to fix the problem.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      2. Reconfigure the baseurl/etc. for the repository, to point to a working
    sensu-sandbox-x86-64:         upstream. This is most often useful if you are using a newer
    sensu-sandbox-x86-64:         distribution release than is supported by the repository (and the
    sensu-sandbox-x86-64:         packages for the previous distribution release still work).
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      3. Run the command with the repository temporarily disabled
    sensu-sandbox-x86-64:             yum --disablerepo=grafana ...
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      4. Disable the repository permanently, so yum won't use it by default. Yum
    sensu-sandbox-x86-64:         will then just ignore the repository until you permanently enable it
    sensu-sandbox-x86-64:         again or use --enablerepo for temporary usage:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --disable grafana
    sensu-sandbox-x86-64:         or
    sensu-sandbox-x86-64:             subscription-manager repos --disable=grafana
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      5. Configure the failing repository to be skipped, if it is unavailable.
    sensu-sandbox-x86-64:         Note that yum will try to contact the repo. when it runs most commands,
    sensu-sandbox-x86-64:         so will have to try and fail each time (and thus. yum will be be much
    sensu-sandbox-x86-64:         slower). If it is a very temporary problem though, this is often a nice
    sensu-sandbox-x86-64:         compromise:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --save --setopt=grafana.skip_if_unavailable=true
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: failure: repodata/repomd.xml from grafana: [Errno 256] No more mirrors to try.
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: Installing Sensu Core
    sensu-sandbox-x86-64: Importing GPG key 0xEBFF1218:
    sensu-sandbox-x86-64:  Userid     : "packagecloud ops (production key) <ops@packagecloud.io>"
    sensu-sandbox-x86-64:  Fingerprint: 6a03 7bb5 2df7 d46d 99dc 59c1 0166 6247 ebff 1218
    sensu-sandbox-x86-64:  From       : https://packagecloud.io/gpg.key
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: Trying other mirror.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:  One of the configured repositories failed (grafana),
    sensu-sandbox-x86-64:  and yum doesn't have enough cached data to continue. At this point the only
    sensu-sandbox-x86-64:  safe thing yum can do is fail. There are a few ways to work "fix" this:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      1. Contact the upstream for the repository and get them to fix the problem.
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      2. Reconfigure the baseurl/etc. for the repository, to point to a working
    sensu-sandbox-x86-64:         upstream. This is most often useful if you are using a newer
    sensu-sandbox-x86-64:         distribution release than is supported by the repository (and the
    sensu-sandbox-x86-64:         packages for the previous distribution release still work).
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      3. Run the command with the repository temporarily disabled
    sensu-sandbox-x86-64:             yum --disablerepo=grafana ...
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      4. Disable the repository permanently, so yum won't use it by default. Yum
    sensu-sandbox-x86-64:         will then just ignore the repository until you permanently enable it
    sensu-sandbox-x86-64:         again or use --enablerepo for temporary usage:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --disable grafana
    sensu-sandbox-x86-64:         or
    sensu-sandbox-x86-64:             subscription-manager repos --disable=grafana
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:      5. Configure the failing repository to be skipped, if it is unavailable.
    sensu-sandbox-x86-64:         Note that yum will try to contact the repo. when it runs most commands,
    sensu-sandbox-x86-64:         so will have to try and fail each time (and thus. yum will be be much
    sensu-sandbox-x86-64:         slower). If it is a very temporary problem though, this is often a nice
    sensu-sandbox-x86-64:         compromise:
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64:             yum-config-manager --save --setopt=grafana.skip_if_unavailable=true
    sensu-sandbox-x86-64: 
    sensu-sandbox-x86-64: failure: repodata/repomd.xml from grafana: [Errno 256] No more mirrors to try.
    sensu-sandbox-x86-64: https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for grafana
    sensu-sandbox-x86-64: sed: can't read /etc/grafana/grafana.ini: No such file or directory
    sensu-sandbox-x86-64: Configuring Sensu
    sensu-sandbox-x86-64: cp: target ‘/etc/sensu/’ is not a directory
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 124: cd: /etc/sensu/conf.d: No such file or directory
    sensu-sandbox-x86-64: Using Base Sensu Core Sandbox provisioning
    sensu-sandbox-x86-64: chown: invalid user: ‘sensu:sensu’
    sensu-sandbox-x86-64: Configuring services
    sensu-sandbox-x86-64: sed: can't read /etc/redis.conf: No such file or directory
    sensu-sandbox-x86-64: sed: can't read /etc/redis.conf: No such file or directory
    sensu-sandbox-x86-64: cp: target ‘/etc/grafana/’ is not a directory
    sensu-sandbox-x86-64: chown: invalid user: ‘grafana:grafana’
    sensu-sandbox-x86-64: chown: invalid user: ‘grafana:grafana’
    sensu-sandbox-x86-64: rm: cannot remove ‘/etc/influxdb/influxdb.conf’: No such file or directory
    sensu-sandbox-x86-64: cp: cannot create regular file ‘/etc/influxdb/influxdb.conf’: No such file or directory
    sensu-sandbox-x86-64: Failed to start rabbitmq-server.service: Unit not found.
    sensu-sandbox-x86-64: Failed to execute operation: No such file or directory
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 158: rabbitmqctl: command not found
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 159: rabbitmqctl: command not found
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 160: rabbitmqctl: command not found
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 163: rabbitmqctl: command not found
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 164: rabbitmqctl: command not found
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 165: rabbitmqctl: command not found
    sensu-sandbox-x86-64: Failed to restart redis.service: Unit not found.
    sensu-sandbox-x86-64: Failed to execute operation: No such file or directory
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 172: redis-cli: command not found
    sensu-sandbox-x86-64: Failed to restart influxdb.service: Unit not found.
    sensu-sandbox-x86-64: Failed to execute operation: No such file or directory
    sensu-sandbox-x86-64: Failed to restart grafana-server.service: Unit not found.
    sensu-sandbox-x86-64: Failed to execute operation: No such file or directory
    sensu-sandbox-x86-64: Creating InfluxDB database
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 181: influx: command not found
    sensu-sandbox-x86-64: /tmp/vagrant-shell: line 182: influx: command not found
    sensu-sandbox-x86-64: Creating Grafana dashboards
    sensu-sandbox-x86-64: Starting Sensu Services
    sensu-sandbox-x86-64: Failed to restart sensu-server.service: Unit not found.
    sensu-sandbox-x86-64: Failed to restart sensu-api.service: Unit not found.
    sensu-sandbox-x86-64: Failed to execute operation: No such file or directory
    sensu-sandbox-x86-64: Failed to restart uchiwa.service: Unit not found.
    sensu-sandbox-x86-64: =================
    sensu-sandbox-x86-64: Sensu Core is now up and running!
    sensu-sandbox-x86-64: Port forwarding from the VM to this host is enabled:
    sensu-sandbox-x86-64:   Access the dashboard at http://localhost:3000
    sensu-sandbox-x86-64: error reading information on service uchiwa: No such file or directory
    sensu-sandbox-x86-64:   Access Grafana at http://localhost:4000
    sensu-sandbox-x86-64: =================

That means that sensu will fail to install, and nothing will be running in the VM.

mpgomez commented 5 years ago

Fix here: https://github.com/sensu/sandbox/pull/44

asachs01 commented 5 years ago

Fixed by #44