Skip to content

Package install is never up to date #621

@ghost

Description

Expected Behavior

Kitchen converge on subsequent runs should have no resources changed

Current Behavior

On subsequent runs the package for sensu keeps getting installed, as a result it triggers a service restart.

Possible Solution

Basically the issue appears to be in the epoch version. if I do a yum info of sensu I get
Name : sensu Arch : x86_64 Epoch : 1 Version : 1.5.0 Release : 1.el7 Size : 82 M Repo : installed From repo : sensu Summary : A monitoring framework that aims to be simple, malleable, and scalable. URL : https://sensu.io License : MIT Description : A monitoring framework that aims to be simple, malleable, and scalable.

and if I in my cookbook a simple
package 'sensu' do version '1:1.5.0-1.el7' end
Everything works as expected. But using the attribute
default["sensu"]["version"] = '1:1.5.0-1'
I get an error
FATAL: ArgumentError: Malformed version number string 1:1.5.0
if I use
default["sensu"]["version"] = '1.5.0-1'
The package just gets installed at every run of chef and triggers a restart of the service
Looks like were doing a lazy against the helper to join the version together in the helper. so I wonder if there is either an issue in sending the ':' to the helper, which seems fine and just does a join anyway or something else?

Steps to Reproduce (for bugs)

  1. kitchen converge with a wrapper on centos 7
  2. set your version attribute to '1.5.0-1.'
    3.kitchen converge first time things look good
    4.kitchen converge a second time and package is set to install again, triggering a restart of he service

Context

Right now im trying to get he cookbook working before putting this up into the environment

Your Environment

  • Version of this cookbook used: 'sensu', '= 5.4.0'
  • Version of Sensu used: 1.5.0-1
  • Version of Chef used: 14.5.33
  • Operating System and version (e.g. CentOS 7, Ubuntu 14.04): Centos 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions