Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

resolve_cookbooks still being called even when --only nodes is specified #85

Open
eherot opened this issue Oct 30, 2014 · 3 comments
Open
Milestone

Comments

@eherot
Copy link

eherot commented Oct 30, 2014

My limited understanding is that this should not happen. Anyway...

NOTE: This was run against the 2.8 branch.

Output tells all:

$ be spiceweasel --loglevel debug --debug --extractlocal ./spiceweasel/manifest.yml --only nodes
DEBUG: No chefignore file found at /Users/eherot/git_repos/evertrue/chefignore no files will be ignored
WARN: found a directory tmp in the cookbook path, but it contains no cookbook files. skipping.
DEBUG: dir_ext: apache_storm 3.0.0
DEBUG: dir_ext: application 2.0.4
DEBUG: dir_ext: application_nginx 1.1.0

Contents of ./spiceweasel/manifest.yml:

clusters:
- stage:
  - ec2 2:
    run_list: recipe[et_base]
    options: -flavor c3.large -g sg-c204d2a7 -N stage-test-eherot-N{{n}} -s subnet-a792da8f -E stage
@mattray mattray added this to the 2.8 milestone Oct 31, 2014
@mattray
Copy link
Owner

mattray commented Nov 4, 2014

I'm not sure this is a workflow I meant to support. The use of --extractlocal means that it's going to try to generate the knife commands to upload everything found in the chef-repo. You're specifying a manifest file, which I believe is ignored since --extractlocal is very similar to --extractyaml, which would generate a YAML file. If you want the extract behavior with --only, I could support that.

  1. Do you want --extract with --only?
  2. The title of this issue makes it sound like you don't want validation with --only. In that case, just use --novalidation and it shouldn't validate (that might be a real bug).

@eherot
Copy link
Author

eherot commented Nov 4, 2014

Perhaps there could be better wording in the docs...What do I do if I just want the knife commands to create what I have in the specified manifest file?

@mattray
Copy link
Owner

mattray commented Nov 4, 2014

The --only flag is supposed to do a subset of the manifest (ie. just the cookbooks or roles or nodes). I haven't verified this, but I wouldn't be surprised if validation is still run across the entire file (--novalidation will turn that off). So if you just want the nodes from a manifest, use

spiceweasel --only nodes --novalidation infrastructure.yml

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

No branches or pull requests

2 participants