chrisroberts / vagabond

Advocating idleness and work-shyness
Other
233 stars 25 forks source link

vagabond init fails after fdcb7377d7bcd3c07ead91a27eb09b364a8f8555 #30

Closed jaypipes closed 11 years ago

jaypipes commented 11 years ago

Hi Chris,

Code that changed after the fdcb7377d7bcd3c07ead91a27eb09b364a8f8555 commit in the develop branch has caused vagabond init and vagabond status to fail, with an odd error:

jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ export BUNDLE_PATH=.bundle; export BERKSHELF_PATH=.berkshelf
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle install && bundle exec berks install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Fetching git://github.com/chrisroberts/vagabond.git
remote: Counting objects: 2783, done.
remote: Compressing objects: 100% (1505/1505), done.
remote: Total 2783 (delta 1236), reused 2690 (delta 1149)
Receiving objects: 100% (2783/2783), 511.30 KiB | 550 KiB/s, done.
Resolving deltas: 100% (1236/1236), done.
Installing i18n (0.6.1) 
Installing multi_json (1.7.7) 
Installing activesupport (3.2.13) 
Installing addressable (2.3.5) 
Installing builder (3.2.2) 
Installing gyoku (1.0.0) 
Installing nokogiri (1.5.10) with native extensions 
Installing akami (1.2.0) 
Installing archive-tar-minitar (0.5.2) 
Installing buff-ruby_engine (0.1.0) 
Installing buff-shell_out (0.1.0) 
Installing timers (1.1.0) 
Installing celluloid (0.14.1) 
Installing hashie (2.0.5) 
Installing chozo (0.6.1) 
Installing multipart-post (1.2.0) 
Installing faraday (0.8.7) 
Installing minitar (0.5.4) 
Installing rbzip2 (0.2.0) 
Installing retryable (1.3.3) 
Installing buff-extensions (0.5.0) 
Installing nio4r (0.4.6) with native extensions 
Installing celluloid-io (0.14.1) 
Installing erubis (2.7.0) 
Installing json (1.7.7) with native extensions 
Installing mixlib-log (1.6.0) 
Installing mixlib-authentication (1.3.0) 
Installing net-http-persistent (2.8) 
Installing net-ssh (2.6.8) 
Installing solve (0.6.0) 
Installing varia_model (0.1.0) 
Installing ffi (1.9.0) with native extensions 
Installing gssapi (1.0.3) 
Installing httpclient (2.2.0.2) 
Installing little-plugger (1.1.3) 
Installing logging (1.6.2) 
Installing rubyntlm (0.1.1) 
Installing rack (1.5.2) 
Installing httpi (0.9.7) 
Installing nori (1.1.5) 
Installing wasabi (1.0.0) 
Installing savon (0.9.5) 
Installing uuidtools (2.1.4) 
Installing winrm (1.1.2) 
Installing ridley (1.2.4) 
Installing thor (0.18.1) 
Installing berkshelf (2.0.7) 
Installing highline (1.6.19) 
Installing mixlib-cli (1.3.0) 
Installing mixlib-config (1.1.2) 
Installing mixlib-shellout (1.1.0) 
Installing net-ssh-gateway (1.2.0) 
Installing net-ssh-multi (1.1) 
Installing ipaddress (0.8.0) 
Installing systemu (2.5.2) 
Installing yajl-ruby (1.1.0) with native extensions 
Installing ohai (6.16.0) 
Installing mime-types (1.23) 
Installing rest-client (1.6.7) 
Installing chef (11.4.4) 
Installing multi_xml (0.5.4) 
Installing httparty (0.11.0) 
Installing fauxhai (1.1.1) 
Installing ci_reporter (1.9.0) 
Installing minitest (4.7.5) 
Installing minitest-chef-handler (1.0.1) 
Installing rspec-core (2.14.3) 
Installing diff-lcs (1.2.4) 
Installing rspec-expectations (2.14.0) 
Installing rspec-mocks (2.14.1) 
Installing rspec (2.14.1) 
Installing chefspec (1.3.1) 
Installing coderay (1.0.9) 
Installing elecksee (1.0.8) 
Installing gherkin (2.11.8) with native extensions 
Installing polyglot (0.3.3) 
Installing treetop (1.4.14) 
Installing foodcritic (2.2.0) 
Installing librarian (0.1.0) 
Installing librarian-chef (0.0.1) 
Installing method_source (0.8.1) 
Installing net-scp (1.1.2) 
Installing slop (3.4.5) 
Installing pry (0.9.12.2) 
Installing safe_yaml (0.9.4) 
Installing serverspec (0.6.3) 
Installing strainer (3.0.4) 
Installing test-kitchen (1.0.0.alpha.7) 
Using vagabond (0.2.9) from git://github.com/chrisroberts/vagabond.git (at develop) 
Using bundler (1.2.3) 
Your bundle is complete! It was installed into ./.bundle
Post-install message from httparty:
When you HTTParty, you must party hard!
Using infra-db (0.1.0)
Installing openstack-block-storage (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-block-storage.git' with branch: 'master' at ref: 'a05a53dfebb3d40097bb582b76cb6c6283d7a8b2'
Installing openstack-common (0.3.3) from git: 'git://github.com/stackforge/cookbook-openstack-common.git' with branch: 'master' at ref: 'f0b24db7b45c2398f40c7a9baee44b81b972b140'
Installing openstack-compute (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-compute.git' with branch: 'master' at ref: 'af3ac2724e0d0457c22710777b93d822948b8374'
Installing openstack-dashboard (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-dashboard.git' with branch: 'master' at ref: '49a40099710b91a536bbf9ff24007cb1e9f42dca'
Installing openstack-identity (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-identity.git' with branch: 'master' at ref: '54e05e5f2e6f57934310c10d418ab263a9eb14bf'
Installing openstack-image (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-image.git' with branch: 'master' at ref: '422f6e41ddafb232cb2ea47f347482aa310df6d0'
Installing openstack-network (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-network.git' with branch: 'master' at ref: 'ad90a7669b9387ec2741c279a8f2c37e00691187'
Installing apt (2.0.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing database (1.4.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing mysql (3.0.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing openssl (1.0.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing build-essential (1.4.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing postgresql (3.0.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing aws (0.101.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing xfs (1.1.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing yum (2.3.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing selinux (0.5.6) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing apache2 (1.6.6) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing sysctl (0.3.3) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing python (1.3.4) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle exec vagabond status
Vagabond exiting. Reason: No such file or directory - /home/jpipes/repos/att-cloud/cookbook-infra-db/.vagabond/cookbooks/vagabond/attributes/default.rb
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ mv Vagabondfile Vagabondfile.bak
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle exec vagabond init
Vagabond exiting. Reason: No such file or directory - /tmp/vagabond/solos/home/jpipes/repos/att/cloud/cookbook/infra/db/.vagabond/cookbooks/vagabond/attributes/default.rb
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ rm -rf .vagabond/
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle exec vagabond init
Vagabond exiting. Reason: No such file or directory - /tmp/vagabond/solos/home/jpipes/repos/att/cloud/cookbook/infra/db/.vagabond/cookbooks/vagabond/attributes/default.rb

After pinning my Gemfile vagabond reference to fdcb7377d7bcd3c07ead91a27eb09b364a8f8555, things started working again:

jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ vv Gemfile
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ rm -rf .berkshelf/ .cookbooks/ .bundle/ .kitchen/
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle install && bundle exec berks install
Fetching git://github.com/chrisroberts/vagabond.git
remote: Counting objects: 2783, done.
remote: Compressing objects: 100% (1505/1505), done.
remote: Total 2783 (delta 1236), reused 2690 (delta 1149)
Receiving objects: 100% (2783/2783), 511.30 KiB | 652 KiB/s, done.
Resolving deltas: 100% (1236/1236), done.
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Installing i18n (0.6.1) 
Installing multi_json (1.7.7) 
Installing activesupport (3.2.13) 
Installing addressable (2.3.5) 
Installing builder (3.2.2) 
Installing gyoku (1.0.0) 
Installing nokogiri (1.5.10) with native extensions 
Installing akami (1.2.0) 
Installing archive-tar-minitar (0.5.2) 
Installing buff-ruby_engine (0.1.0) 
Installing buff-shell_out (0.1.0) 
Installing timers (1.1.0) 
Installing celluloid (0.14.1) 
Installing hashie (2.0.5) 
Installing chozo (0.6.1) 
Installing multipart-post (1.2.0) 
Installing faraday (0.8.7) 
Installing minitar (0.5.4) 
Installing rbzip2 (0.2.0) 
Installing retryable (1.3.3) 
Installing buff-extensions (0.5.0) 
Installing nio4r (0.4.6) with native extensions 
Installing celluloid-io (0.14.1) 
Installing erubis (2.7.0) 
Installing json (1.7.7) with native extensions 
Installing mixlib-log (1.6.0) 
Installing mixlib-authentication (1.3.0) 
Installing net-http-persistent (2.8) 
Installing net-ssh (2.6.8) 
Installing solve (0.6.0) 
Installing varia_model (0.1.0) 
Installing ffi (1.9.0) with native extensions 
Installing gssapi (1.0.3) 
Installing httpclient (2.2.0.2) 
Installing little-plugger (1.1.3) 
Installing logging (1.6.2) 
Installing rubyntlm (0.1.1) 
Installing rack (1.5.2) 
Installing httpi (0.9.7) 
Installing nori (1.1.5) 
Installing wasabi (1.0.0) 
Installing savon (0.9.5) 
Installing uuidtools (2.1.4) 
Installing winrm (1.1.2) 
Installing ridley (1.2.4) 
Installing thor (0.18.1) 
Installing berkshelf (2.0.7) 
Installing highline (1.6.19) 
Installing mixlib-cli (1.3.0) 
Installing mixlib-config (1.1.2) 
Installing mixlib-shellout (1.1.0) 
Installing net-ssh-gateway (1.2.0) 
Installing net-ssh-multi (1.1) 
Installing ipaddress (0.8.0) 
Installing systemu (2.5.2) 
Installing yajl-ruby (1.1.0) with native extensions 
Installing ohai (6.16.0) 
Installing mime-types (1.23) 
Installing rest-client (1.6.7) 
Installing chef (11.4.4) 
Installing multi_xml (0.5.4) 
Installing httparty (0.11.0) 
Installing fauxhai (1.1.1) 
Installing ci_reporter (1.9.0) 
Installing minitest (4.7.5) 
Installing minitest-chef-handler (1.0.1) 
Installing rspec-core (2.14.3) 
Installing diff-lcs (1.2.4) 
Installing rspec-expectations (2.14.0) 
Installing rspec-mocks (2.14.1) 
Installing rspec (2.14.1) 
Installing chefspec (1.3.1) 
Installing coderay (1.0.9) 
Installing elecksee (1.0.8) 
Installing gherkin (2.11.8) with native extensions 
Installing polyglot (0.3.3) 
Installing treetop (1.4.14) 
Installing foodcritic (2.2.0) 
Installing librarian (0.1.0) 
Installing librarian-chef (0.0.1) 
Installing method_source (0.8.1) 
Installing net-scp (1.1.2) 
Installing slop (3.4.5) 
Installing pry (0.9.12.2) 
Installing safe_yaml (0.9.4) 
Installing serverspec (0.6.3) 
Installing strainer (3.0.4) 
Installing test-kitchen (1.0.0.alpha.7) 
Using vagabond (0.2.9) from git://github.com/chrisroberts/vagabond.git (at 211e9e1) 
Using bundler (1.2.3) 
Your bundle is complete! It was installed into ./.bundle
Post-install message from httparty:
When you HTTParty, you must party hard!
Using infra-db (0.1.0)
Installing openstack-block-storage (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-block-storage.git' with branch: 'master' at ref: 'a05a53dfebb3d40097bb582b76cb6c6283d7a8b2'
Installing openstack-common (0.3.3) from git: 'git://github.com/stackforge/cookbook-openstack-common.git' with branch: 'master' at ref: 'f0b24db7b45c2398f40c7a9baee44b81b972b140'
Installing openstack-compute (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-compute.git' with branch: 'master' at ref: 'af3ac2724e0d0457c22710777b93d822948b8374'
Installing openstack-dashboard (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-dashboard.git' with branch: 'master' at ref: '49a40099710b91a536bbf9ff24007cb1e9f42dca'
Installing openstack-identity (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-identity.git' with branch: 'master' at ref: '54e05e5f2e6f57934310c10d418ab263a9eb14bf'
Installing openstack-image (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-image.git' with branch: 'master' at ref: '422f6e41ddafb232cb2ea47f347482aa310df6d0'
Installing openstack-network (7.0.0) from git: 'git://github.com/stackforge/cookbook-openstack-network.git' with branch: 'master' at ref: 'ad90a7669b9387ec2741c279a8f2c37e00691187'
Installing apt (2.0.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing database (1.4.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing mysql (3.0.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing openssl (1.0.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing build-essential (1.4.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing postgresql (3.0.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing aws (0.101.2) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing xfs (1.1.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing yum (2.3.0) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing selinux (0.5.6) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing apache2 (1.6.6) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing sysctl (0.3.3) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
Installing python (1.3.4) from site: 'http://cookbooks.opscode.com/api/v1/cookbooks'
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle exec vagabond init
Include template: ubuntu_1004 [y] n
WARNING: Skipping instance for template ubuntu_1004
Include template: ubuntu_1204 [y] y
Enabling template ubuntu_1204 with node name ubuntu1204
Include template: ubuntu_1210 [y] n
WARNING: Skipping instance for template ubuntu_1210
Include template: centos_58 [y] n
WARNING: Skipping instance for template centos_58
Include template: centos_63 [y] n
WARNING: Skipping instance for template centos_63
Include template: centos_64 [y] n
WARNING: Skipping instance for template centos_64
Include template: debian_6 [y] n
WARNING: Skipping instance for template debian_6
Include template: debian_7 [y] n
WARNING: Skipping instance for template debian_7
Ensuring expected system state (creating required base containers)
   - This can take a while on first run or new templates...
[sudo] password for jpipes: 
  -> COMPLETE!
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ mv Vagabondfile.bak Vagabondfile
jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle exec vagabond server up
Generating RSA private key, 2048 bit long modulus
........+++
...........+++
unable to write 'random state'
e is 65537 (0x10001)
Generating RSA private key, 2048 bit long modulus
.....+++
..........+++
unable to write 'random state'
e is 65537 (0x10001)
Vagabond: Creating server
WARNING: Found server instance not if configuration. Adding and moving on.
  -> Chef Server container created!
  -> Chef Server CREATED!
  -> Bootstrapping erchef...
Auto uploading all assets to local Chef server...
Local chef server: Uploading roles
  -> UPLOADED ROLES
Local chef server: Uploading data bags
  -> UPLOADED DATA BAGS
Local chef server: Uploading environments
  -> UPLOADED ENVIRONMENTS
Local chef server: Uploading cookbooks
Cookbooks being uploaded via berks
  -> UPLOADED COOKBOOKS
  -> All assets uploaded!
  -> CREATED!
  -> Bootstrapping erchef...

Since the error message indicates something with a /tmp/vagabond/solos path:

jpipes@uberbox:~/repos/att-cloud/cookbook-infra-db$ bundle exec vagabond init
Vagabond exiting. Reason: No such file or directory - /tmp/vagabond/solos/home/jpipes/repos/att/cloud/cookbook/infra/db/.vagabond/cookbooks/vagabond/attributes/default.rb

you may want to look at any code that modified the Chef solo setups (though not that I don't actually use Chef solo).

Also note that the /tmp/vagabond/solos/home/jpipes/repos/att/cloud/cookbook/infra/db/.vagabond/cookbooks/vagabond/attributes/default.rb path has broken our infra-db cookbook into an /cookbook/infra/db path... which I'm sure is faulty.

Thanks! -jay

chrisroberts commented 11 years ago

@jaypipes I did a bunch of hacking and it looks like I had a commit still local that should fix the missing file issue. If you update and it's still an issue, let me know. Apologies, I'm looking to get a new version cut in the next day or two and pushed up a lot of changes over the last few days.

For the path issue, it shouldn't be a huge deal as vagabond just wants a unique path on the host to store things. However, I would like it to be consistent with the cookbook name so I'll have a look and get it cleaned up.

Thanks!

jaypipes commented 11 years ago

No worries at all, Chris

chrisroberts commented 11 years ago

If this is still an issue, please reopen.

Thanks!