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

package.rpm state does not default to present #446

Closed
ryane opened this issue Oct 28, 2016 · 2 comments
Closed

package.rpm state does not default to present #446

ryane opened this issue Oct 28, 2016 · 2 comments
Labels

Comments

@ryane
Copy link
Contributor

ryane commented Oct 28, 2016

example:

package.rpm "mc" {
  name = "mc"
}
$ /usr/local/bin/converge plan --local rpm.hcl
2016-10-28T15:00:56Z |INFO| serving     addr=:47740 component=rpc
2016-10-28T15:00:56Z |WARN| skipping module verification        component=client
2016-10-28T15:00:56Z |INFO| got status  component=client file=rpm.hcl id=root/package.rpm.mc run=STARTED stage=PLAN
2016-10-28T15:00:57Z |INFO| got status  component=client file=rpm.hcl id=root run=STARTED stage=PLAN

root/package.rpm.mc:
 Messages:
 Has Changes: yes
 Changes:
  mc: "absent" => ""

Summary: 0 errors, 1 changes

$ /usr/local/bin/converge apply --local rpm.hcl
2016-10-28T15:01:03Z |INFO| serving     addr=:47740 component=rpc
2016-10-28T15:01:03Z |WARN| skipping module verification        component=client
2016-10-28T15:01:03Z |INFO| got status  component=client file=rpm.hcl id=root/package.rpm.mc run=STARTED stage=APPLY
2016-10-28T15:01:04Z |INFO| got status  component=client file=rpm.hcl id=root run=STARTED stage=APPLY

root/package.rpm.mc:
 Error: root/package.rpm.mc still has changes after apply: exit status 1
 Messages:
 Has Changes: yes
 Changes:
  mc: "absent" => ""

Summary: 2 errors, 1 changes

 * root/package.rpm.mc: root/package.rpm.mc still has changes after apply: exit status 1
 * root: error in dependency "root/package.rpm.mc"

The preparer uses a default struct tag but it looks like that tag is not actually implemented. We should either explicitly require State to be specified or default it to "present".

If we do the latter, should we implement a default struct tag?

@ryane ryane added the bug label Oct 28, 2016
@stevendborrelli
Copy link
Member

Feels like having a default struct tag would make things easier for module writers.

@rebeccaskinner
Copy link
Contributor

fixed in #463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants