Skip to content

Instantly share code, notes, and snippets.

@equick
equick / gist:33bc5343cfb4724b8936
Created October 1, 2015 16:06
public_ip_addresses error
$ kitchen create
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-centos-65>...
OpenStack instance with ID of <e41aa1c7-4b97-4825-ba8d-e62c48959d27> is ready.
>>>>>> Server (e41aa1c7-4b97-4825-ba8d-e62c48959d27) not reachable. Destroying server...
OpenStack instance <e41aa1c7-4b97-4825-ba8d-e62c48959d27> destroyed.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `public_ip_addresses' for {}:Hash]
>>>>>> ----------------------
@equick
equick / gist:0bdf9b8e640082d515c5
Created October 1, 2015 16:09
addresses error
$ kitchen create
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-centos-65>...
OpenStack instance with ID of <54ba5d4c-5382-40d2-af00-77948f564884> is ready.
>>>>>> Server (54ba5d4c-5382-40d2-af00-77948f564884) not reachable. Destroying server...
OpenStack instance <54ba5d4c-5382-40d2-af00-77948f564884> destroyed.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `addresses' for {}:Hash]
>>>>>> ----------------------
$ kitchen verify -l debug
-----> Starting Kitchen (v1.4.2)
D Berksfile found at /apps/home/quickedw/barcmw-chef-repo/cookbooks/tomcat-examples/Berksfile, loading Berkshelf
D Berkshelf 3.2.4 library loaded
-----> Creating <default-centos-65>...
D Selected image: a106113e-b506-4a80-8db8-c40993fb9ca4 rhel6-650-dev-00
D Selected flavor: edce228b-e5ba-436b-856e-75e00ffaea23 linux_dev_burst.s1
D Selected net: c006d56e-e7ab-4851-96f1-20e958758c9c nonprod1-net1
OpenStack instance with ID of <99e42dea-a389-4457-9521-ddca4e365485> is ready.
D Using configured net: nonprod1-net1
$ kitchen verify -l debug
-----> Starting Kitchen (v1.4.2)
D Berksfile found at /apps/home/quickedw/barcmw-chef-repo/cookbooks/tomcat-examples/Berksfile, loading Berkshelf
D Berkshelf 3.2.4 library loaded
-----> Creating <default-centos-65>...
D Selected image: a106113e-b506-4a80-8db8-c40993fb9ca4 rhel6-650-dev-00
D Selected flavor: edce228b-e5ba-436b-856e-75e00ffaea23 linux_dev_burst.s1
D Selected net: c006d56e-e7ab-4851-96f1-20e958758c9c nonprod1-net1
OpenStack instance with ID of <b8b410aa-5663-4713-95ef-4060027d574f> is ready.
>>>>>> Server (b8b410aa-5663-4713-95ef-4060027d574f) not reachable. Destroying server...
$ cat .kitchen.yml
---
driver:
name: openstack
openstack_username:
openstack_api_key:
openstack_auth_url:
openstack_tenant: 'StEng'
network_ref: nonprod1-net1
private_key_path: /home/quickedw/.ssh/engpsr001
$ kitchen create -l debug
-----> Starting Kitchen (v1.4.2)
D Berksfile found at /apps/home/quickedw/barcmw-chef-repo/cookbooks/tomcat-examples/Berksfile, loading Berkshelf
D Berkshelf 3.2.4 library loaded
-----> Creating <default-centos-65>...
D Selected image: a106113e-b506-4a80-8db8-c40993fb9ca4 rhel6-650-dev-00
D Selected flavor: edce228b-e5ba-436b-856e-75e00ffaea23 linux_dev_burst.s1
D Selected net: c006d56e-e7ab-4851-96f1-20e958758c9c nonprod1-net1
OpenStack instance with ID of <b07088c1-351c-4c6c-96b1-6552b04d6e74> is ready.
D Using configured net: nonprod1-net1
$ diff -u openstack.rb.orig openstack.rb
--- openstack.rb.orig 2015-10-02 15:55:50.275001569 +0100
+++ openstack.rb 2015-10-02 16:33:21.998001380 +0100
@@ -102,7 +102,7 @@
elsif config[:floating_ip_pool]
attach_ip_from_pool(server, config[:floating_ip_pool])
end
- wait_for_server(state)
+ #wait_for_server(state)
setup_ssh(server, state) if bourne_shell?
@equick
equick / gist:acbc54bb93dacf155e0b
Created October 2, 2015 20:05
kitchen verify
$ kitchen verify
-----> Starting Kitchen (v1.4.2)
-----> Setting up <default-centos-65>...
Finished setting up <default-centos-65> (0m0.00s).
-----> Verifying <default-centos-65>...
Preparing files for transfer
-----> Installing Busser (busser)
ERROR: Could not find a valid gem 'busser' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/specs.4.8.gz)
sh: line 23: /tmp/verifier/gems/bin/busser: No such file or directory
* mw-tomcat_selinux[tomcat-examples-instance2] action create
* selinux_policy_port[8029] action addormodify
Recipe: selinux_policy::helper_scripts
* remote_directory[/var/chef/cache/selinux_policy/helper_scripts] action create
Recipe: <Dynamically Defined Resource>
* cookbook_file[/var/chef/cache/selinux_policy/helper_scripts/port_locate.py] action create (up to date)
(up to date)
* execute[selinux-port-8029-addormodify] action run
================================================================================
* selinux_policy_port[8029] action addormodify
Recipe: selinux_policy::helper_scripts
* remote_directory[/var/chef/cache/selinux_policy/helper_scripts] action create
Recipe: <Dynamically Defined Resource>
* cookbook_file[/var/chef/cache/selinux_policy/helper_scripts/port_locate.py] action create
- update content in file /var/chef/cache/selinux_policy/helper_scripts/port_locate.py from 56fc8f to ed1da3
--- /var/chef/cache/selinux_policy/helper_scripts/port_locate.py 2015-10-11 20:44:27.410039803 +0100
+++ /var/chef/cache/selinux_policy/helper_scripts/.port_locate.py20151011-32335-yvsok0 2015-10-11 21:10:48.229041347 +0100
@@ -34,7 +34,7 @@