Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow default template to add custom attributes #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dnlloyd
Copy link

@dnlloyd dnlloyd commented Jun 15, 2015

No description provided.

@dnlloyd
Copy link
Author

dnlloyd commented Jul 9, 2015

A couple things about this commit...

The attributes I added to the .kitchen.yml are to test the minimal functionality of the customized template and customized attributes file. I wanted to verify 1)that the iterations through my device attributes behaved correctly and 2)the merge for the default attributes came together correctly. If this is overkill I can remove them.

I also ran into three issue that I did not resolve in this commit but I would like to resolve, if possible:

Issue 1: converge of customized-ubuntu-1204
ERROR: apt_package[multipath-tools]

Resolution: need to run apt-get update manually first before package resource can run successfully. A possible solution is to include the apt-get default recipe in the default multipath recipe. I have not tested this but it appears to run the apt-get update. This is also relevant to default-ubuntu-1204.

Issue 2: create customized-centos-59
default: Box 'opscode-centos-5.9' could not be found.
(https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.9_chef-provisionerless.box)

Resolution: I do not see this box at (https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox),perhaps it was removed. I validated that centos-510 did exist and passed existing tests in this project; can we switch to this box? This of course is also relevant to default-centos-59

Issue 3: converge customized-ubuntu-1004
Error executing action start on resource 'service[multipath-tools]'

Resolution: This version of the multipath-tools service returns 1 when the start command is issued and the service is already running (it must get started when the pkg is installed) so the service resource fails unless the service is stopped. Stopping service manually, re-running converge allows it to complete, but additional converges of course fail. This is specific to the service on Ubuntu 10.04. Changing the action of the service resource to restart would allow the cookbook to run successfully, but I think thats a bit ugly since the issue is with the multipath service, not the cookbook. Perhaps another version of Ubuntu 10 would be better to test against. I'd need to look into this.

@@ -0,0 +1,4 @@
if node['multipath']['storage_type'] == "customized"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to put this inside of a hash rather than using the if matching here.

ex:

default['multipath']['customized']['defaults']

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic was left-over from a previous iteration I had and I forgot to remove it. I think it would suffice to just remove the logic, don't you?

@ovaistariq
Copy link
Owner

@dnlloyd I was out on vacation and got back to work today. I am slowly catching up on my emails. I will get to this very soon.

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

Successfully merging this pull request may close these issues.

4 participants