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
[BUG FIX] Linux installers #203
Conversation
…a step to create c:\habitat directory since powershell was failing on that step. placeholder for upgrade enhancement Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Wininstall [BUG FIX] Issue chef-boneyard#199
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
removing unwanted tests
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
fixed bad syntax in install resource
test Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
removed bad unit test
* fixing delivery errors Signed-off-by: Jeff Brimager <jbrimager@chef.io> * missed toml correction in config.rb fixing for delivery tests Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
…md template Signed-off-by: Jeff Brimager <jbrimager@chef.io>
@@ -110,9 +110,7 @@ def strip_version(name) | |||
def platform_target | |||
if platform_family?('windows') | |||
'target=x86_64-windows' | |||
elsif platform_family?('rhel') && node['platform_version'].to_i < 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This was some hot nonesense here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was causing some serious crazy to happen
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
libraries/provider_hab_package.rb
Outdated
elsif platform_family?('rhel') && node['platform_version'].to_i < 6 | ||
'target=x86_64-linux-kernel2' | ||
elsif platform_family?('suse') && node['platform_version'].to_i < 6 | ||
elsif node['kernel']['release'].to_f < 3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could easily just .to_i < 3 here as well. No need to treat it as a float
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. It think at first I was accidentally calling version rather than release and didnt understand why I was failing and forgot to change it when i caught my original mistake. Will change that up and push it again
Signed-off-by: Jeff Brimager <jbrimager@chef.io>
libraries/provider_hab_package.rb
Outdated
@@ -110,7 +110,7 @@ def strip_version(name) | |||
def platform_target | |||
if platform_family?('windows') | |||
'target=x86_64-windows' | |||
elsif node['kernel']['release'].to_f < 3.0 | |||
elsif node['kernel']['release'].to_i < 3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elsif node['kernel']['release'].to_i < 3.0 | |
elsif node['kernel']['release'].to_i < 3 |
resources/install.rb
Outdated
@@ -175,7 +175,7 @@ def hab_path | |||
end | |||
|
|||
def hab_command | |||
cmd = if node['kernel']['release'].to_f < 3.0 | |||
cmd = if node['kernel']['release'].to_i < 3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd = if node['kernel']['release'].to_i < 3.0 | |
cmd = if node['kernel']['release'].to_i < 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't believe I did that on both of those. They are fixed. Thanks pointing it out.
… for the kernel version check Signed-off-by: Jeff Brimager <jbrimager@chef.io>
Obvious fix; these changes are the result of automation not creative thinking.
Description
This PR addresses the following issues
#201
#188
These 2 were addressed by the same change.
The current code is as follows.
This logic does not check for platform or kernel version. This causes the install resource to default to the non-kernel2 version.
The new code verifies kernel release and assigns the correct values accordingly
This is also a problem for package verification due to to the vast sprawl in what kernels are used by the supported linux distros. With the difference in version numbers vs kernel release between similar platform types. I feel like platform_version isn't an accurate check. In my testing I've seen the following.
provider_hab_package
library does the following. The problem with this is, Red hat 6.10 is using kernel2. Suse was released with kernel 2 up to version 11.2. Centos 6 can be on kernel 3 etc.#47
Since creating
hab-sup.service
is done by thehab_sup
resource which, also calls the install resource, I took a look at the code being used in the libraryresource_hab_sup_systemd
and it was missing theExecStop
which is all that is required to add thesystemctl restart
I added the line along with a few other functions.Issues Resolved
hab-sup.service
in systemd now provides a restart function.Check List