[DRE-maint] Bug#921986: ruby-cheffish: FTBFS randomly (failing tests)
Santiago Vila
sanvila at debian.org
Sun Feb 10 22:06:07 GMT 2019
Package: src:ruby-cheffish
Version: 13.1.0-2
Severity: important
Tags: ftbfs
Dear maintainer:
I tried to build this package in sid but it failed:
--------------------------------------------------------------------------------
[...]
debian/rules build-indep
dh build-indep --buildsystem=ruby --with ruby
dh_update_autotools_config -i -O--buildsystem=ruby
dh_autoreconf -i -O--buildsystem=ruby
dh_auto_configure -i -O--buildsystem=ruby
dh_ruby --configure
dh_auto_build -i -O--buildsystem=ruby
dh_ruby --build
dh_ruby --build
dh_auto_test -i -O--buildsystem=ruby
dh_ruby --test
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary-indep
dh binary-indep --buildsystem=ruby --with ruby
dh_testroot -i -O--buildsystem=ruby
dh_prep -i -O--buildsystem=ruby
debian/rules override_dh_auto_install
make[1]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p /<<PKGBUILDDIR>>/tmp
dh_auto_install
dh_ruby --install /<<PKGBUILDDIR>>/debian/ruby-cheffish
dh_ruby --install
┌──────────────────────────────────────────────────────────────────────────────┐
│ Install files │
└──────────────────────────────────────────────────────────────────────────────┘
install -d /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/key_formatter.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/key_formatter.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/with_pattern.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/with_pattern.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/chef_run.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/chef_run.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/chef_run_support.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/chef_run_support.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/repository_support.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/repository_support.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/recipe_run_wrapper.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/recipe_run_wrapper.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/matchers.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/matchers/emit_no_warnings_or_errors.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers/emit_no_warnings_or_errors.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/matchers/partially_match.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers/partially_match.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/matchers/be_idempotent.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers/be_idempotent.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec/matchers/have_updated.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers/have_updated.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/version.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/version.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/node_properties.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/node_properties.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/base_properties.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/base_properties.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/basic_chef_client.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/basic_chef_client.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/chef_run_listener.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/chef_run_listener.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/server_api.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/server_api.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/recipe_dsl.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/recipe_dsl.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/chef_actor_base.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/chef_actor_base.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/chef_run_data.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/chef_run_data.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/rspec.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/rspec.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/merged_config.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/merged_config.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/array_property.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/array_property.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/cheffish/base_resource.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/cheffish/base_resource.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_resolved_cookbooks.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_resolved_cookbooks.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_group.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_group.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_role.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_role.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/public_key.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/public_key.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_data_bag.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_data_bag.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_container.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_container.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_mirror.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_mirror.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/private_key.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/private_key.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_acl.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_acl.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_data_bag_item.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_data_bag_item.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_user.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_user.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_organization.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_organization.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_environment.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_environment.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_client.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_client.rb
install -D -m644 /<<PKGBUILDDIR>>/lib/chef/resource/chef_node.rb /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby/chef/resource/chef_node.rb
┌──────────────────────────────────────────────────────────────────────────────┐
│ Install Rubygems integration metadata │
└──────────────────────────────────────────────────────────────────────────────┘
generating gemspec at /<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/share/rubygems-integration/all/specifications/cheffish-13.1.0.gemspec
/usr/bin/ruby2.5 /usr/bin/gem2deb-test-runner
┌──────────────────────────────────────────────────────────────────────────────┐
│ Checking Rubygems dependency resolution on ruby2.5 │
└──────────────────────────────────────────────────────────────────────────────┘
GEM_PATH=debian/ruby-cheffish/usr/share/rubygems-integration/all:/<<PKGBUILDDIR>>/tmp/.gem/ruby/2.5.0:/var/lib/gems/2.5.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all ruby2.5 -e gem\ \"cheffish\"
┌──────────────────────────────────────────────────────────────────────────────┐
│ Run tests for ruby2.5 from debian/ruby-tests.rake │
└──────────────────────────────────────────────────────────────────────────────┘
RUBYLIB=/<<PKGBUILDDIR>>/debian/ruby-cheffish/usr/lib/ruby/vendor_ruby:. GEM_PATH=debian/ruby-cheffish/usr/share/rubygems-integration/all:/<<PKGBUILDDIR>>/tmp/.gem/ruby/2.5.0:/var/lib/gems/2.5.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all ruby2.5 -S rake -f debian/ruby-tests.rake
/usr/bin/ruby2.5 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Cheffish fingerprint key formatter
when computing key fingperprints
computes the PKCS#8 SHA1 private key fingerprint correctly (PENDING: No reason given)
computes the PKCS#1 MD5 public key fingerprint correctly
computes the RFC4716 MD5 public key fingerprint correctly
defaults to the PKCS#1 MD5 public key fingerprint
merged_config
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /<<PKGBUILDDIR>>/spec/functional/merged_config_spec.rb:35:in `block (2 levels) in <top (required)>'
returns value in config
WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at /<<PKGBUILDDIR>>/spec/functional/merged_config_spec.rb:39:in `block (3 levels) in <top (required)>'
raises a NoMethodError if calling an unknown method with arguments
has an informative string representation
has indifferent str/sym access
respects precedence between the different configs
merges the configs
handle merged value type mismatch
merges values when they're hashes
supports nested merged configs
api version
is pinned to 0
Chef::Resource::ChefAcl
Rights attributes
When the Chef server has a node named x
Converging chef_acl "nodes/x" changes nothing
Converging chef_acl "nodes/x" with "complete true" and no rights raises an error
Removing all :grant rights from a node raises an error
Converging chef_acl "nodes/x" with "complete true" removes all ACLs except those specified in :all
Converging chef_acl "nodes/y" throws a 404
and a user "blarghle"
Converging chef_acl "nodes/x" with user "blarghle" adds the user
Converging chef_acl "nodes/x" with "complete true" removes all ACLs except those specified
and a client "blarghle"
Converging chef_acl "nodes/x" with client "blarghle" adds the client
and a group "blarghle"
Converging chef_acl "nodes/x" with group "blarghle" adds the group
and multiple users and groups
Converging chef_acls should ignore order of the values in the acls
Converging chef_acl "nodes/x" with multiple groups, users and clients in an acl makes the appropriate changes
Converging chef_acl "nodes/x" with multiple groups, users and clients across multiple "rights" groups makes the appropriate changes
Converging chef_acl "nodes/x" with rights [ :read, :create, :update, :delete, :grant ] modifies all rights
Converging chef_acl "nodes/x" with rights :all modifies all rights
When the Chef server has a node named x with user blarghle in its acl
Converging chef_acl "nodes/x" with that user changes nothing
When the Chef server has a node named x with users foo and bar in all its acls
Converging chef_acl "nodes/x" with remove_rights :all removes foo from everything
recursive
When the Chef server has a nodes container with user blarghle in its acl
Converging chef_acl "nodes" makes no changes
Converging chef_acl "nodes" with recursive :on_change makes no changes
Converging chef_acl "nodes" with recursive true changes nodes/x's acls
Converging chef_acl "" with recursive false does not change nodes/x's acls
Converging chef_acl "" with recursive :on_change does not change nodes/x's acls
Converging chef_acl "" with recursive true changes nodes/x's acls
ACLs on each type of thing
When the Chef server has an organization named foo
and the chef server URL points at /organizations/foo
relative paths
chef_acl 'nodes/x' changes the acls
chef_acl '*/*' changes the acls
absolute paths
chef_acl '/organizations/foo/clients/x' changes the acl
chef_acl '/organizations/foo/containers/x' changes the acl
chef_acl '/organizations/foo/cookbooks/x' changes the acl
chef_acl '/organizations/foo/data/x' changes the acl
chef_acl '/organizations/foo/environments/x' changes the acl
chef_acl '/organizations/foo/groups/x' changes the acl
chef_acl '/organizations/foo/nodes/x' changes the acl
chef_acl '/organizations/foo/roles/x' changes the acl
chef_acl '/organizations/foo/sandboxes/x' changes the acl
chef_acl '/organizations/foo/clients/x' changes the acl
chef_acl '/organizations/foo/containers/x' changes the acl
chef_acl '/organizations/foo/cookbooks/x' changes the acl
chef_acl '/organizations/foo/data/x' changes the acl
chef_acl '/organizations/foo/environments/x' changes the acl
chef_acl '/organizations/foo/groups/x' changes the acl
chef_acl '/organizations/foo/nodes/x' changes the acl
chef_acl '/organizations/foo/roles/x' changes the acl
chef_acl '/organizations/foo/sandboxes/x' changes the acl
chef_acl '/*/*/clients/*' changes the acl
chef_acl '/*/*/containers/*' changes the acl
chef_acl '/*/*/cookbooks/*' changes the acl
chef_acl '/*/*/data/*' changes the acl
chef_acl '/*/*/environments/*' changes the acl
chef_acl '/*/*/groups/*' changes the acl
chef_acl '/*/*/nodes/*' changes the acl
chef_acl '/*/*/roles/*' changes the acl
chef_acl '/*/*/*/x' changes the acls
chef_acl '/*/*/*/*' changes the acls
chef_acl "/organizations/foo/data_bags/x" changes the acl
chef_acl "/*/*/data_bags/*" changes the acl
chef_acl '/organizations/foo/cookbooks/x/1.0.0' raises an error
chef_acl '/organizations/foo/cookbooks/*/*' raises an error (PENDING: No reason given)
chef_acl "/organizations/foo/data/x/y" raises an error
chef_acl "/organizations/foo/data/*/*" raises an error (PENDING: No reason given)
chef_acl "/organizations/foo" changes the acl
chef_acl "/organizations/*" changes the acl
chef_acl "/users/x" changes the acl
chef_acl "/users/*" changes the acl
chef_acl "/*/x" changes the acl
chef_acl "/*/*" changes the acl
and the chef server URL points at /organizations/bar
chef_acl '/organizations/foo/nodes/*' changes the acl
and the chef server URL points at /
chef_acl '/organizations/foo/nodes/*' changes the acl
When the Chef server has a user "u" in single org mode
chef_acl clients/x' changes the acl
chef_acl containers/x' changes the acl
chef_acl cookbooks/x' changes the acl
chef_acl data/x' changes the acl
chef_acl environments/x' changes the acl
chef_acl groups/x' changes the acl
chef_acl nodes/x' changes the acl
chef_acl roles/x' changes the acl
chef_acl sandboxes/x' changes the acl
chef_acl 'clients/*' changes the acl
chef_acl 'containers/*' changes the acl
chef_acl 'cookbooks/*' changes the acl
chef_acl 'data/*' changes the acl
chef_acl 'environments/*' changes the acl
chef_acl 'groups/*' changes the acl
chef_acl 'nodes/*' changes the acl
chef_acl 'roles/*' changes the acl
chef_acl '*/x' changes the acls
chef_acl '*/*' changes the acls
chef_acl 'groups/*' changes the acl
chef_acl "data_bags/x" changes the acl
chef_acl "data_bags/*" changes the acl
chef_acl "" changes the organization acl
ACLs on each container type
When the Chef server has an organization named foo
chef_acl '/organizations/foo/clients' changes the acl
chef_acl '/organizations/foo/containers' changes the acl
chef_acl '/organizations/foo/cookbooks' changes the acl
chef_acl '/organizations/foo/data' changes the acl
chef_acl '/organizations/foo/environments' changes the acl
chef_acl '/organizations/foo/groups' changes the acl
chef_acl '/organizations/foo/nodes' changes the acl
chef_acl '/organizations/foo/roles' changes the acl
chef_acl '/organizations/foo/sandboxes' changes the acl
chef_acl '/*/*/clients' changes the acl
chef_acl '/*/*/containers' changes the acl
chef_acl '/*/*/cookbooks' changes the acl
chef_acl '/*/*/data' changes the acl
chef_acl '/*/*/environments' changes the acl
chef_acl '/*/*/groups' changes the acl
chef_acl '/*/*/nodes' changes the acl
chef_acl '/*/*/roles' changes the acl
chef_acl '/*/*/*' changes the acls (FAILED - 1)
chef_acl "/organizations/foo/data_bags" changes the acl
chef_acl "/*/*/data_bags" changes the acl
When the Chef server has a user "u" in single org mode
chef_acl clients' changes the acl
chef_acl containers' changes the acl
chef_acl cookbooks' changes the acl
chef_acl data' changes the acl
chef_acl environments' changes the acl
chef_acl groups' changes the acl
chef_acl nodes' changes the acl
chef_acl roles' changes the acl
chef_acl sandboxes' changes the acl
chef_acl '*' changes the acls
remove_rights
When the Chef server has a node "x" with "u", "c" and "g" in its acl
chef_acl with remove_rights "u" removes the user's rights
chef_acl with remove_rights "c" removes the client's rights
chef_acl with remove_rights "g" removes the group's rights
chef_acl with remove_rights [ :create, :read ], "u", "c", "g" removes all three
chef_acl with remove_rights "u2", "c2", "g2" has no effect
When the Chef server has a node named data_bags
Converging chef_acl "nodes/data_bags" with user "blarghle" adds the user
When the Chef server has a node named data_bags in multi-org mode
Converging chef_acl "/organizations/foo/nodes/data_bags" with user "blarghle" adds the user
When the Chef server has a user named data_bags in multi-org mode
Converging chef_acl "/users/data_bags" with user "blarghle" adds the user
Chef::Resource::ChefClient
When the Chef server is in multi-org mode
and is empty
and we have a private key with a path
and we run a recipe that creates client "blah"
the client gets created
and we run a recipe that creates client "blah" with output_key_path
the output public key gets created
and a private_key 'blah' resource
and a chef_client 'foobar' resource with source_key_path 'blah'
the client is accessible via the given private key
When the Chef server is in OSC mode
and is empty
and we have a private key with a path
and we run a recipe that creates client "blah"
the client gets created
Chef::Resource::ChefContainer
When the Chef server is in multi-org mode
Converging chef_container "x" creates the container
and already has a container named x
Converging chef_container "x" changes nothing
Chef::Resource::ChefDataBagItem
When the Chef server foo
when data bag "bag" exists
runs a recipe that creates a chef_data_bag_item "bag/item"
Chef::Resource::ChefGroup
When the Chef server is in multi-org mode
and is empty
Converging chef_group "x" creates the group with no members
chef_group "x" action :delete does nothing
Converging chef_group "x" creates the group with the given members
and has a group named x
Converging chef_group "x" changes nothing
chef_group "x" action :delete deletes the group
Converging chef_group "x" with existing users changes nothing
Converging chef_group "x" adds new users
Converging chef_group "x" with multiple users adds new users
Converging chef_group "x" with multiple users in an array adds new users
Converging chef_group "x" with multiple users declarations adds new users
Converging chef_group "x" removes desired users
Converging chef_group "x" with multiple users removes desired users
Converging chef_group "x" with multiple users in an array removes desired users
Converging chef_group "x" with multiple remove_ declarations removes desired users
Converging chef_group "x" adds and removes desired users
Chef::Resource::ChefMirror
When the Chef server is in multi-org mode
basic download and upload
when the chef repo is full of stuff
Download grabs defaults
Upload uploads everything
chef_mirror with concurrency 0 fails with a reasonable message
and the Chef server has a node and role in it
when the chef repo is empty
Download grabs the node and role
Upload uploads nothing
and the Chef server has nodes and roles named x
when the chef repo has nodes and roles named y
Download grabs the x's
Upload uploads the y's
Download with purge grabs the x's and deletes the y's
Upload with :purge uploads the y's and deletes the x's
chef_repo_path
when the chef repo has stuff but no chef_repo_path
Upload with chef_repo_path('repo') uploads everything
Upload with chef_repo_path(:chef_repo_path) with multiple paths uploads everything
Upload with chef_repo_path(:node_path, :role_path) uploads everything
Upload with chef_repo_path(:chef_repo_path, :role_path) uploads everything
Upload with chef_repo_path(:node_path, :role_path) with multiple paths uploads everything
cookbook upload, chef_repo_path and versioned_cookbooks
when the chef repo has cookbooks in non-versioned format
chef_mirror :upload uploads everything
and Chef::Config.versioned_cookbooks is false
chef_mirror :upload uploads everything
and Chef::Config.chef_repo_path is not set but versioned_cookbooks is false
chef_mirror :upload with chef_repo_path and versioned_cookbooks false uploads cookbooks with name including version
when the chef repo has cookbooks in versioned_cookbook format
and Chef::Config.versioned_cookbooks is true
chef_mirror :upload uploads everything
and Chef::Config.chef_repo_path set somewhere else
chef_mirror :upload with chef_repo_path uploads cookbooks
and Chef::Config.chef_repo_path is not set but versioned_cookbooks is false
chef_mirror :upload with chef_repo_path uploads cookbooks with name split from version
chef_mirror :upload with chef_repo_path and versioned_cookbooks uploads cookbooks with name split from version
and Chef::Config.chef_repo_path is not set but versioned_cookbooks is true
chef_mirror :upload with chef_repo_path uploads cookbooks with name split from version
cookbook download, chef_repo_path, and versioned_cookbooks
when the Chef server has a cookbook with multiple versions
when the chef repo is empty
chef_mirror :download downloads the latest version of the cookbook
chef_mirror :download with versioned_cookbooks = true downloads all versions of the cookbook
and Chef::Config.chef_repo_path is set elsewhere
chef_mirror :download with chef_repo_path downloads all versions of the cookbook
chef_mirror :download with chef_repo_path and versioned_cookbooks = false downloads the latest version of the cookbook
and Chef::Config.versioned_cookbooks is true
chef_mirror :download downloads all versions of the cookbook
chef_mirror :download with versioned_cookbooks = false downloads the latest version of the cookbook
and Chef::Config.chef_repo_path is set elsewhere
chef_mirror :download with chef_repo_path downloads all versions of the cookbook
chef_mirror :download with chef_repo_path and versioned_cookbooks = false downloads the latest version of the cookbook
Chef::Resource::ChefNode
When the Chef server is in multi-org mode
and is empty
and we run a recipe that creates node "blah"
the node gets created
and another chef server is running on port 8899
and a recipe is run that creates node "blah" on the second chef server using with_chef_server
the node is created on the second chef server but not the first
and a recipe is run that creates node "blah" on the second chef server using chef_server
the node is created on the second chef server but not the first
and has a node named "blah"
chef_node "blah" does not get created or updated
and has a node named "blah" with tags
with chef_node "blah" that sets attributes
the tags in attributes are used
with chef_node "blah" that sets attributes with tags in them
the tags in attributes are used
#complete
when the Chef server has a node named "blah" with everything in it
chef_node with no attributes modifies nothing
chef_node with complete true removes everything except default, automatic and override
chef_node with complete true sets the given attributes
chef_node with complete true and partial attributes sets the given attributes
#attributes
with a node with normal attributes a => b and c => { d => e }
chef_node with attributes {} removes all normal attributes but leaves tags, automatic and environment alone
chef_node with attributes { c => d } replaces normal but not tags/automatic/environment
chef_node with attributes { c => f => g, y => z } replaces normal but not tags/automatic/environment
chef_node with attributes { tags => [ "x" ] } replaces normal and tags but not automatic/environment
chef_node with tags "x" and attributes { "tags" => [ "y" ] } sets tags to "x"
#attribute
with a node with normal attributes a => b and c => { d => e }
basic scenarios
chef_node with no attributes, leaves it alone
chef_node with attribute d, e adds the attribute
chef_node with attribute tags, [ "x" ] replaces tags
chef_node with attribute c, x replaces the attribute
chef_node with attribute c, { d => x } replaces the attribute
chef_node with attribute [ c, d ], x replaces the attribute
chef_node with attribute [ a, b ], x raises an error
chef_node with attribute [ a, b, c ], x raises an error
chef_node with attribute [ x, y ], z adds a new attribute
chef_node with attribute [], {} clears all attributes
delete
chef_node with attribute a, :delete deletes the attribute
chef_node with attribute c, :delete deletes the attribute
chef_node with attribute [ c, d ], :delete deletes the attribute
chef_node with attribute xyz, :delete does nothing
chef_node with attribute [ c, x ], :delete does nothing
types
chef_node with attribute a, true sets a to true
chef_node with attribute a, 1 sets a to 1
chef_node with attribute a, "1" sets a to "1"
chef_node with attribute a, "" sets a to ""
chef_node with attribute a, nil sets a to nil
multiple attribute definitions
chef_node with attribute a, x and c, y replaces both attributes
chef_node with attribute m, x and n, y adds both attributes
chef_node with attribute [x, y], z and [x, yy], zz adds both attributes
precedence
chef_node with attribute a, 1 and a, 2 sets a to 2
chef_node with attribute [ x, y ], 1 and [ x, y ], 2 sets [ x, y ], 2
chef_node with attribute [ c, e ], { a => 1 }, [ c, e ], { b => 2 } sets b only
chef_node with attribute [ c, e ], { a => 1 }, [ c, e, b ], 2 sets both
chef_node with attribute [ c, e, b ], 2, [ c, e ], { a => 1 } sets a only
When the Chef server is in OSC mode
and is empty
and we run a recipe that creates node "blah"
the node gets created
Chef::Resource::ChefOrganization
When the Chef server is in multi-org mode
and chef_server_url is pointed at the top level
chef_organization "x" creates the organization
and chef_server_url is pointed at /organizations/foo
and is empty
chef_organization "x" creates the organization
chef_organization "x" with full_name creates the organization
chef_organization "x" and inviting users creates the invites
chef_organization "x" adds members
and already has an organization named x
chef_organization "x" changes nothing
chef_organization "x" with "complete true" reverts the full_name
chef_organization "x" with new full_name updates the organization
invites and membership tests
chef_organization "x" and inviting users creates the invites
chef_organization "x" adds members
chef_organization "x" does nothing when inviting already-invited users and members
chef_organization "x" does nothing when adding members who are already members
chef_organization "x" upgrades invites to members when asked
chef_organization "x" removes members and invites when asked
chef_organization "x" does nothing when asked to remove non-members
chef_organization "x" with "complete true" reverts the full_name but does not remove invites or members
chef_organization "x" with members [] and "complete true" removes invites and members
chef_organization "x" with invites [] and "complete true" removes invites but not members
chef_organization "x" with invites, members and "complete true" removes all non-specified invites and members
Chef::Resource::ChefRole
When the Chef server is in multi-org mode
and is empty
and we run a recipe that creates role "blah"
the role gets created
and another chef server is running on port 8899
and a recipe is run that creates role "blah" on the second chef server using with_chef_server
the role is created on the second chef server but not the first
and a recipe is run that creates role "blah" on the second chef server using chef_server
the role is created on the second chef server but not the first
When the Chef server is in OSC mode
and is empty
and we run a recipe that creates role "blah"
the role gets created
Chef::Resource::ChefUser
When the Chef server is empty
and we run a recipe that creates user "blah"
the user gets created
and we run a recipe that creates user "blah" with output_key_path
the output public key gets created
When the Chef server is in multi-org mode
and chef_server_url is pointed at the top level
and we run a recipe that creates user "blah"
the user gets created
and chef_server_url is pointed at /organizations/foo
and we run a recipe that creates user "blah"
the user gets created
Chef::Resource::PrivateKey
with a recipe with a private_key
the private_key is created in pem format
with a private_key "blah" resource
the private key is created in the private_key_write_path
and the private key already exists somewhere not in the write path
the private expect(key).to not update
with a private key
a private_key that copies it from in-memory as a string succeeds
a private_key that copies it from in-memory as a key succeeds
and a private_key that copies it in der format
the private_key is copied in der format and is identical
and a public_key recipe
the public_key is created
and a public key
and another public_key based off the first public_key in-memory in a key, the second public_key is created
and public_key resource based off the public key file
the second public_key is created
and another public_key based off the first public_key in-memory in a string
the second public_key is created
and another public_key in :pem format based off the first public_key
the second public_key is created
and another public_key in :der format based off the first public_key
the second public_key is created
and a public_key resource in pem format
the public_key is created
and a public_key resource in der format
the public_key is created in openssh format
with a recipe with a private_key in der format
the private_key is created
with a private key in der format
and a public_key
the public_key is created in openssh format
with a recipe with a private_key with a pass_phrase
the private_key is created
with a private key with a pass phrase
a private_key resource that copies it from in-memory as a string succeeds
and a private_key that copies it in der format
the private_key is copied in der format and is identical
and a private_key resource pointing at it without a pass_phrase
the run fails with an exception
and a private_key resource with no pass phrase and regenerate_if_different
the private_key is regenerated
and a public_key
the public_key is created in openssh format
and a public_key derived from the private key in an in-memory string
the public_key is created in openssh format
with a recipe with a private_key and public_key_path
the private_key and public_key are created
with a recipe with a private_key and public_key_path and public_key_format
the private_key and public_key are created
with a recipe with a private_key with path :none
the private_key is created
Cheffish Recipe DSL
when we include with_chef_local_server
[2019-02-10T16:52:24+00:00] DEBUG: GET /organizations/chef/nodes/blah
[2019-02-10T16:52:24+00:00] DEBUG: #<ChefZero::RestRequest:0x00007fe0e44779b8
@env=
{"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"/nodes/blah",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"127.0.0.1",
"REQUEST_METHOD"=>"GET",
"REQUEST_URI"=>"http://127.0.0.1:8901/nodes/blah",
"SCRIPT_NAME"=>"",
"SERVER_NAME"=>"127.0.0.1",
"SERVER_PORT"=>"8901",
"SERVER_PROTOCOL"=>"HTTP/1.1",
"SERVER_SOFTWARE"=>"WEBrick/1.4.2 (Ruby/2.5.3/2018-10-18) OpenSSL/1.1.1a",
"HTTP_ACCEPT"=>"application/json",
"HTTP_ACCEPT_ENCODING"=>"gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"HTTP_X_OPS_SERVER_API_VERSION"=>"0",
"HTTP_X_REMOTE_REQUEST_ID"=>"44f468b7-ed4f-4558-9c3e-a9ed8475dec8",
"HTTP_X_CHEF_VERSION"=>"13.8.7",
"HTTP_HOST"=>"127.0.0.1:8901",
"HTTP_USER_AGENT"=>
"Chef Knife/13.8.7 (ruby-2.5.3-p105; ohai-13.8.0; x86_64-linux-gnu; +https://chef.io)",
"HTTP_CONNECTION"=>"close",
"rack.version"=>[1, 3],
"rack.input"=>#<StringIO:0x00007fe0e4477c10>,
"rack.errors"=>#<IO:<STDERR>>,
"rack.multithread"=>true,
"rack.multiprocess"=>false,
"rack.run_once"=>false,
"rack.url_scheme"=>"http",
"rack.hijack?"=>true,
"rack.hijack"=>
#<Proc:0x00007fe0e4477aa8@/usr/lib/ruby/vendor_ruby/rack/handler/webrick.rb:74 (lambda)>,
"rack.hijack_io"=>nil,
"HTTP_VERSION"=>"HTTP/1.1",
"REQUEST_PATH"=>"/nodes/blah"},
@rest_base_prefix=["organizations", "chef"],
@rest_path=["organizations", "chef", "nodes", "blah"]>
[2019-02-10T16:52:24+00:00] DEBUG: #<ChefZero::RestErrorResponse: 404: Object not found: http://127.0.0.1:8901/nodes/blah>
/usr/lib/ruby/vendor_ruby/chef_zero/rest_base.rb:89:in `rescue in get_data'
/usr/lib/ruby/vendor_ruby/chef_zero/rest_base.rb:81:in `get_data'
/usr/lib/ruby/vendor_ruby/chef_zero/endpoints/rest_object_endpoint.rb:18:in `get'
/usr/lib/ruby/vendor_ruby/chef_zero/rest_base.rb:59:in `call'
/usr/lib/ruby/vendor_ruby/chef_zero/rest_router.rb:24:in `call'
/usr/lib/ruby/vendor_ruby/chef_zero/server.rb:664:in `block in app'
/usr/lib/ruby/vendor_ruby/rack/handler/webrick.rb:86:in `service'
/usr/lib/ruby/2.5.0/webrick/httpserver.rb:140:in `service'
/usr/lib/ruby/2.5.0/webrick/httpserver.rb:96:in `run'
/usr/lib/ruby/2.5.0/webrick/server.rb:307:in `block in start_thread'
[2019-02-10T16:52:24+00:00] DEBUG:
--- RESPONSE (404) ---
{
"error": [
"Object not found: http://127.0.0.1:8901/nodes/blah"
]
}
--- END RESPONSE ---
[2019-02-10T16:52:24+00:00] DEBUG: POST /organizations/chef/nodes
--- POST BODY ---
{"name":"blah","json_class":"Chef::Node","chef_type":"node","chef_environment":"_default","override":{},"normal":{"tags":null},"default":{},"automatic":{},"run_list":[]}
--- END POST BODY ---
[2019-02-10T16:52:24+00:00] DEBUG: #<ChefZero::RestRequest:0x00007fe0e444d690
@body=
"{\"name\":\"blah\",\"json_class\":\"Chef::Node\",\"chef_type\":\"node\",\"chef_environment\":\"_default\",\"override\":{},\"normal\":{\"tags\":null},\"default\":{},\"automatic\":{},\"run_list\":[]}",
@env=
{"CONTENT_LENGTH"=>"169",
"CONTENT_TYPE"=>"application/json",
"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"/nodes",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"127.0.0.1",
"REQUEST_METHOD"=>"POST",
"REQUEST_URI"=>"http://127.0.0.1:8901/nodes",
"SCRIPT_NAME"=>"",
"SERVER_NAME"=>"127.0.0.1",
"SERVER_PORT"=>"8901",
"SERVER_PROTOCOL"=>"HTTP/1.1",
"SERVER_SOFTWARE"=>"WEBrick/1.4.2 (Ruby/2.5.3/2018-10-18) OpenSSL/1.1.1a",
"HTTP_ACCEPT"=>"application/json",
"HTTP_ACCEPT_ENCODING"=>"gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"HTTP_X_OPS_SERVER_API_VERSION"=>"0",
"HTTP_X_REMOTE_REQUEST_ID"=>"44f468b7-ed4f-4558-9c3e-a9ed8475dec8",
"HTTP_X_CHEF_VERSION"=>"13.8.7",
"HTTP_HOST"=>"127.0.0.1:8901",
"HTTP_USER_AGENT"=>
"Chef Knife/13.8.7 (ruby-2.5.3-p105; ohai-13.8.0; x86_64-linux-gnu; +https://chef.io)",
"HTTP_CONNECTION"=>"close",
"rack.version"=>[1, 3],
"rack.input"=>#<StringIO:0x00007fe0e444d898>,
"rack.errors"=>#<IO:<STDERR>>,
"rack.multithread"=>true,
"rack.multiprocess"=>false,
"rack.run_once"=>false,
"rack.url_scheme"=>"http",
"rack.hijack?"=>true,
"rack.hijack"=>
#<Proc:0x00007fe0e444d780@/usr/lib/ruby/vendor_ruby/rack/handler/webrick.rb:74 (lambda)>,
"rack.hijack_io"=>nil,
"HTTP_VERSION"=>"HTTP/1.1",
"REQUEST_PATH"=>"/nodes"},
@rest_base_prefix=["organizations", "chef"],
@rest_path=["organizations", "chef", "nodes"]>
[2019-02-10T16:52:24+00:00] DEBUG:
--- RESPONSE (201) ---
{
"uri": "http://127.0.0.1:8901/nodes/blah"
}
--- END RESPONSE ---
chef_nodes get put into said server
Cheffish::RSpec::ChefRunSupport
#recipe
recipe { file ... } updates the file
recipe 'file ...' does not update the file
recipe 'file ...' with file and line number does not update the file
#converge
converge { file ... } updates the file
converge 'file ...' updates the file
converge 'file ...' with file and line number updates the file
#expect_recipe
expect_recipe { file ... }.to be_updated updates the file, and be_idempotent does not fail
expect_recipe 'file ...'.to be_updated updates the file, and be_idempotent does not fail
expect_recipe('file ...', file, line).to be_updated updates the file, and be_idempotent does not fail
expect_recipe { file ... }.to be_up_to_date fails
expect_recipe { }.to be_updated fails
expect_recipe { }.to be_up_to_date succeeds
expect_recipe { }.to be_idempotent succeeds
#expect_converge
expect_converge { file ... }.not_to raise_error updates the file
expect_converge('file ...').not_to raise_error updates the file
expect_converge('file ...', file, line).not_to raise_error updates the file
expect_converge { raise 'oh no' }.to raise_error passes
when there is a let variable
converge { let_variable } accesses it
converge with a file resource referencing let_variable accesses let_variable
Cheffish
#get_private_key
when private_key_paths has a directory which is empty
behaves like returning the contents of the key file if it finds one
returns nil if it cannot find the private key file
returns the contents of the key if it doesn't have an extension
returns the contents of the key if it has an extension
returns the contents of arbitrarily named keys
returns the contents of the key that does not have an extension if both exist
when it also has a garbage file
does not return the da vinci virus if we find only the garbage file
behaves like returning the contents of the key file if it finds one
returns nil if it cannot find the private key file
returns the contents of the key if it doesn't have an extension
returns the contents of the key if it has an extension
returns the contents of arbitrarily named keys
returns the contents of the key that does not have an extension if both exist
when private_key_paths leads with a directory that does not exist and then an empty directory
behaves like returning the contents of the key file if it finds one
returns nil if it cannot find the private key file
returns the contents of the key if it doesn't have an extension
returns the contents of the key if it has an extension
returns the contents of arbitrarily named keys
returns the contents of the key that does not have an extension if both exist
when private_keys is empty
returns nil
when private_keys contains the path to a key
returns the contents of the key file
when private_keys contains the path to a key
returns the contents of the key file
Cheffish::RSpec::RecipeRunWrapper
defines #respond_to_missing? on the client
calls the new super.respond_to_missing
does not define #respond_to_missing? on the client
calls the original super.respond_to_missing
Pending: (Failures listed here are expected and do not affect your suite's status)
1) Cheffish fingerprint key formatter when computing key fingperprints computes the PKCS#8 SHA1 private key fingerprint correctly
# No reason given
Failure/Error: raise "PKCS8 SHA1 not supported in Ruby #{RUBY_VERSION}"
RuntimeError:
PKCS8 SHA1 not supported in Ruby 2.5.3
# ./lib/cheffish/key_formatter.rb:59:in `encode'
# ./spec/functional/fingerprint_spec.rb:37:in `key_to_format'
# ./spec/functional/fingerprint_spec.rb:43:in `block (3 levels) in <top (required)>'
2) Chef::Resource::ChefAcl ACLs on each type of thing When the Chef server has an organization named foo and the chef server URL points at /organizations/foo absolute paths chef_acl '/organizations/foo/cookbooks/*/*' raises an error
# No reason given
Failure/Error:
expect_converge do
chef_acl "/organizations/foo/cookbooks/*/*" do
rights :read, users: %w{u}
end
end.to raise_error(/ACLs cannot be set on children of \/organizations\/foo\/cookbooks\/*/)
expected /ACLs cannot be set on children of \/organizations\/foo\/cookbooks\/*/ but nothing was raised
# ./spec/integration/chef_acl_spec.rb:457:in `block (6 levels) in <top (required)>'
3) Chef::Resource::ChefAcl ACLs on each type of thing When the Chef server has an organization named foo and the chef server URL points at /organizations/foo absolute paths chef_acl "/organizations/foo/data/*/*" raises an error
# No reason given
Failure/Error:
expect_converge do
chef_acl "/organizations/foo/data/*/*" do
rights :read, users: %w{u}
end
end.to raise_error(/ACLs cannot be set on children of \/organizations\/foo\/data\/*/)
expected /ACLs cannot be set on children of \/organizations\/foo\/data\/*/ but nothing was raised
# ./spec/integration/chef_acl_spec.rb:474:in `block (6 levels) in <top (required)>'
Failures:
1) Chef::Resource::ChefAcl ACLs on each container type When the Chef server has an organization named foo chef_acl '/*/*/*' changes the acls
Failure/Error: rest.put(rest_url("#{acl}/#{permission}"), { permission => desired_json })
Timeout::Error:
Timeout connecting to http://127.0.0.1:8900/organizations/foo/containers/groups/_acl/read, giving up
# ./lib/chef/resource/chef_acl.rb:115:in `block (3 levels) in create_acl'
# ./lib/chef/resource/chef_acl.rb:114:in `each'
# ./lib/chef/resource/chef_acl.rb:114:in `block (2 levels) in create_acl'
# ./lib/chef/resource/chef_acl.rb:113:in `each'
# ./lib/chef/resource/chef_acl.rb:113:in `block in create_acl'
# ./lib/chef/resource/chef_acl.rb:112:in `create_acl'
# ./lib/chef/resource/chef_acl.rb:130:in `block in create_acl'
# ./lib/chef/resource/chef_acl.rb:128:in `create_acl'
# ./lib/chef/resource/chef_acl.rb:74:in `block (2 levels) in <class:ChefAcl>'
# ./lib/chef/resource/chef_acl.rb:73:in `each'
# ./lib/chef/resource/chef_acl.rb:73:in `block in <class:ChefAcl>'
# (eval):2:in `block in action_create'
# (eval):2:in `action_create'
# ./lib/cheffish/basic_chef_client.rb:68:in `block in converge'
# ./lib/cheffish/basic_chef_client.rb:132:in `with_chef_config'
# ./lib/cheffish/basic_chef_client.rb:67:in `converge'
# ./lib/cheffish/chef_run.rb:89:in `converge'
# ./lib/cheffish/rspec/chef_run_support.rb:52:in `expect_recipe'
# ./spec/integration/chef_acl_spec.rb:711:in `block (4 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Net::OpenTimeout:
# execution expired
# ./lib/chef/resource/chef_acl.rb:115:in `block (3 levels) in create_acl'
Finished in 54.38 seconds (files took 3.16 seconds to load)
331 examples, 1 failure, 3 pending
Failed examples:
rspec ./spec/integration/chef_acl_spec.rb:710 # Chef::Resource::ChefAcl ACLs on each container type When the Chef server has an organization named foo chef_acl '/*/*/*' changes the acls
/usr/bin/ruby2.5 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
ERROR: Test "ruby2.5" failed. Exiting.
dh_auto_install: dh_ruby --install /<<PKGBUILDDIR>>/debian/ruby-cheffish returned exit code 1
make[1]: *** [debian/rules:11: override_dh_auto_install] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary-indep] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-indep subprocess returned exit status 2
--------------------------------------------------------------------------------
I don't have a "recipe" as such to reproduce this, because it's random, but
the failures also seem to happen here:
https://tests.reproducible-builds.org/debian/history/ruby-cheffish.html
I've put a bunch of my failed build logs here:
https://people.debian.org/~sanvila/build-logs/ruby-cheffish/
If for whatever reason you could not reproduce the randomness, please contact me
privately and I will gladly offer ssh access to a system where this randomness
happens.
Thanks.
More information about the Pkg-ruby-extras-maintainers
mailing list