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 use gluster recipe on already existed filesystem #77

Merged
merged 1 commit into from
Dec 8, 2016
Merged

Allow use gluster recipe on already existed filesystem #77

merged 1 commit into from
Dec 8, 2016

Conversation

theundefined
Copy link
Contributor

No description provided.

Copy link
Owner

@shortdudey123 shortdudey123 left a comment

Choose a reason for hiding this comment

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

Can you also add a changelog entry?

@@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs and configures Gluster servers and clients'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '5.1.0'
version '5.1.1'
Copy link
Owner

Choose a reason for hiding this comment

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

Revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why? I think that's a "feature" fix, so it's easier to bump version to point which version works :)

Copy link
Owner

Choose a reason for hiding this comment

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

Version bumps happen when a release it cut

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

size volume_values['size']
filesystem filesystem
mount_point "#{node['gluster']['server']['brick_mount_path']}/#{volume_name}"
if node['gluster']['server']['disks'].any?
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add an else to this with a warning log saying that no LVM setup will be done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

end
end

directory "#{node['gluster']['server']['brick_mount_path']}/#{volume_name}" do
Copy link
Owner

Choose a reason for hiding this comment

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

Have you confirmed this will not have any affect on LVM based mounts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'ts just creating directory. If directory already exists - nothing will change. But - i can put it into conditional block.

Copy link
Owner

Choose a reason for hiding this comment

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

Cool, just confirming

@@ -92,6 +103,7 @@
# Create option string
force = false
options = ''
force = true if node['gluster']['server']['disks'].empty?
Copy link
Owner

@shortdudey123 shortdudey123 Dec 7, 2016

Choose a reason for hiding this comment

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

Why is force need here? What error does gluster throw?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

force is needed only when gluster is creating on root partition/volume (for example on kitchen ;). But i dont know how to easy check if there is that case. I think about conditional "force" option for volume configuration.

Copy link
Owner

Choose a reason for hiding this comment

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

df /path/to/dir | tail -1 then check the last part of the array
There is probably other solutions too

Example outside the context of chef

[3] pry(main)> `df /etc | tail -1`.chomp.split[-1]
=> "/"
[4] pry(main)> 

@theundefined
Copy link
Contributor Author

Is that better? :-)

@shortdudey123 shortdudey123 changed the title allow create on shared disk (without management of lvm volumes) Allow use gluster recipe on already existed filesystem Dec 8, 2016
Copy link
Owner

@shortdudey123 shortdudey123 left a comment

Choose a reason for hiding this comment

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

Much better! Nice work
Can you squash the commits then i will merge?

@theundefined
Copy link
Contributor Author

squashed :-)

@shortdudey123 shortdudey123 merged commit 01e892a into shortdudey123:master Dec 8, 2016
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.

2 participants