spiceweasel icon indicating copy to clipboard operation
spiceweasel copied to clipboard

resolve_cookbooks still being called even when `--only nodes` is specified

Open eherot opened this issue 11 years ago • 3 comments
trafficstars

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

eherot avatar Oct 30 '14 20:10 eherot

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).

mattray avatar Nov 04 '14 15:11 mattray

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?

eherot avatar Nov 04 '14 15:11 eherot

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

mattray avatar Nov 04 '14 22:11 mattray