-
Notifications
You must be signed in to change notification settings - Fork 290
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
Error installing Sensu on Windows Server 2012R2 #646
Comments
Without this patch there is no test coverage for Package[sensu] when the client is a windows node. This patch adds test coverage to fix the bug reported in sensuGH-646.
Without this patch there isn't a Vagrant VM for Win2012r2. Windows is necessary to reproduce the issue in sensuGH-646 and smoke test the fix. Relates to sensu#681
Without this patch there is no test coverage for Package[sensu] when the client is a windows node. This patch adds test coverage to fix the bug reported in sensuGH-646.
Without this patch there isn't a Vagrant VM for Win2012r2. Windows is necessary to reproduce the issue in sensuGH-646 and smoke test the fix. Using opentable/win-2012r2 Vagrant vm client RDP port is exposed. Login is vagrant / vagrant. Relates to sensu#681
Without this patch there is no test coverage for Package[sensu] when the client is a windows node. This patch adds test coverage to fix the bug reported in sensuGH-646.
Without this patch there isn't a Vagrant VM for Win2012r2. Windows is necessary to reproduce the issue in sensuGH-646 and smoke test the fix. Using opentable/win-2012r2 Vagrant vm client RDP port is exposed. Login is vagrant / vagrant. Relates to sensu#681
|
@ghoneycutt I've resolved the Package[Sensu] error by rebasing the work in #635. I'm running into this issue now: It seems we need to specify an explicit version for windows. I notice Do you have any guidance on how to handle this for windows? Maybe specify an explicit default version via hiera data in the module with an entry in the hierarchy for osfamily? |
Without this patch there is no test coverage for Package[sensu] when the client is a windows node. This patch adds test coverage to fix the bug reported in sensuGH-646.
Without this patch there isn't a Vagrant VM for Win2012r2. Windows is necessary to reproduce the issue in sensuGH-646 and smoke test the fix. Using opentable/win-2012r2 Vagrant vm client RDP port is exposed. Login is vagrant / vagrant. Relates to sensu#681
Partially resolves sensu#646 Still running into this error: Error: Parameter ensure failed on Package[sensu]: Provider windows must have features 'upgradeable' to set 'ensure' to 'latest' at sensu/manifests/package.pp:64
Without this patch there is no test coverage for Package[sensu] when the client is a windows node. This patch adds test coverage to fix the bug reported in sensuGH-646.
Without this patch there isn't a Vagrant VM for Win2012r2. Windows is necessary to reproduce the issue in sensuGH-646 and smoke test the fix. Using opentable/win-2012r2 Vagrant vm client RDP port is exposed. Login is vagrant / vagrant. Relates to sensu#681
Partially resolves sensu#646 Still running into this error: Error: Parameter ensure failed on Package[sensu]: Provider windows must have features 'upgradeable' to set 'ensure' to 'latest' at sensu/manifests/package.pp:64
Without this patch there is no test coverage for Package[sensu] when the client is a windows node. This patch adds test coverage to fix the bug reported in sensuGH-646.
Without this patch there isn't a Vagrant VM for Win2012r2. Windows is necessary to reproduce the issue in sensuGH-646 and smoke test the fix. Using opentable/win-2012r2 Vagrant vm client RDP port is exposed. Login is vagrant / vagrant. Relates to sensu#681
The name parameter of Package[sensu] needs to match Add/Remove programs, which is `Sensu`
Partially resolves sensu#646 Still running into this error: Error: Parameter ensure failed on Package[sensu]: Provider windows must have features 'upgradeable' to set 'ensure' to 'latest' at sensu/manifests/package.pp:64
Without this patch the default package version for sensu is `latest`. This is a problem for two reasons, first the package may be automatically upgraded on Linux systems, which is a burden for Operations when behavior changes. Second, Windows does not have a provider supporting the upgradable feature which results in an error in the default case. This path addresses both issues by defaulting the version to `installed`. For the Windows 2012r2 Vagrant box, the version is explicitly passed in tests/sensu-client-windows.pp because http://repositories.sensuapp.org/msi/ does not have sensu-latest.msi, which is used in the default case.
Without this patch the computation of the package source URL will inevitably be incorrect for some users. To avoid support issues, this patch adds an override as an escape hatch. The user may specific the specific package source URL which will override the computation.
The name parameter of Package[sensu] needs to match Add/Remove programs, which is `Sensu`
The OS expects version numbers to be dotted, e.g. 0.29.0.11, whereas the file paths have a hyphen denoting the release component. This patch maps the file version ID to the package version ID to allow the catalog to converge.
The name parameter of Package[sensu] needs to match Add/Remove programs, which is `Sensu`
The OS expects version numbers to be dotted, e.g. 0.29.0.11, whereas the file paths have a hyphen denoting the release component. This patch maps the file version ID to the package version ID to allow the catalog to converge.
The name parameter of Package[sensu] needs to match Add/Remove programs, which is `Sensu`
The OS expects version numbers to be dotted, e.g. 0.29.0.11, whereas the file paths have a hyphen denoting the release component. This patch maps the file version ID to the package version ID to allow the catalog to converge.
Remove agent install log only if the log exists. Avoids this error:
==> win2012r2-client: Log will be written to C:/vagrant/puppet-agent.log
==> win2012r2-client: Remove-Item : Cannot find path 'C:\vagrant\puppet-agent.log' because it does
==> win2012r2-client: not exist.
==> win2012r2-client: At C:\tmp\vagrant-shell.ps1:9 char:3
==> win2012r2-client: + Remove-Item $log
==> win2012r2-client: + ~~~~~~~~~~~~~~~~
==> win2012r2-client: + CategoryInfo : ObjectNotFound: (C:\vagrant\puppet-agent.log:Str
==> win2012r2-client: ing) [Remove-Item], ItemNotFoundException
==> win2012r2-client: + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov
==> win2012r2-client: eItemCommand
|
Fixed in v2.8.0 |
|
@jeffmccune this seemed to work from my Mac -> Windows doing acceptance testing which includes the sensu module in my profile for windows but had someone run from Windows -> Windows and there is a newline/CR between https://github.com/sensu/sensu-puppet/blame/master/manifests/package.pp#L72 Guessing possibly something with how the template is rendered from Windows vs a *nix platform? Template should be working without carriage return |
|
What do you mean running acceptance tests windows to windows? I'm not following you. |
|
@ghoneycutt I have a profile_base::windows class that includes sensu module and configurations. |
|
@ghoneycutt just to give full code: class profile_base::windows {
include ::profile_base::sensu
}class profile_base::sensu (
Boolean $server,
String $rabbitmq_host,
String $rabbitmq_password,
String $rabbitmq_vhost,
Array[String] $subscriptions,
Array[String] $sensu_additional_plugins,
String $client_bind,
String $client_port,
Hash $client_plugins_script,
Hash $client_keepalive,
Hash $client_custom,
String $default_client_name,
Array[String] $sensu_plugins,
String $sensu_client_prefix,
String $version,
Optional[Boolean] $enterprise,
Optional[Boolean] $enterprise_dashboard,
Optional[String] $enterprise_user,
Optional[String] $enterprise_pass,
Optional[Boolean] $manage_user = false,
Optional[String] $package_checksum = undef,
Optional[String] $windows_repo_prefix = undef,
Optional[Boolean] $windows_logrotate = false,
Optional[String] $windows_log_number = undef,
Optional[String] $windows_log_size = undef,
Optional[String] $windows_pkg_url = undef,
)
{
assert_private()
#notify { 'Applying class profile_base::sensu': }
if $facts['ec2_metadata'] {
$client_name = $facts['ec2_metadata']['instance-id']
} elsif $::hostname {
$client_name = $::hostname
} else {
$client_name = $default_client_name
}
$client_name_with_prefix="${sensu_client_prefix}${client_name}"
if $::ipaddress {
$client_address = $::ipaddress
} else {
$client_address = '127.0.0.1'
}
class { '::sensu':
version => $version,
install_repo => true,
server => $server,
api => $server,
client => true,
use_embedded_ruby => true,
rabbitmq_host => $rabbitmq_host,
rabbitmq_password => $rabbitmq_password,
rabbitmq_vhost => $rabbitmq_vhost,
subscriptions => $subscriptions,
client_name => $client_name_with_prefix,
client_address => $client_address,
client_keepalive => $client_keepalive,
client_custom => $client_custom,
client_port => $client_port,
client_bind => $client_bind,
enterprise => $enterprise,
enterprise_dashboard => $enterprise_dashboard,
enterprise_user => $enterprise_user,
enterprise_pass => $enterprise_pass,
package_checksum => $package_checksum,
windows_repo_prefix => $windows_repo_prefix,
windows_logrotate => $windows_logrotate,
windows_log_size => $windows_log_size,
windows_log_number => $windows_log_number,
manage_user => $manage_user,
windows_pkg_url => $windows_pkg_url,
}
# Install plugins and scripts
...
}profile_base::sensu::version: '0.28.5-2'
profile_base::sensu::package_checksum: 'ae321125091331771aa6f9edbcbacb0a'
profile_base::sensu::windows_repo_prefix: 'http://artifactory.domain.local/sensu/msi'
profile_base::sensu::windows_logrotate: true
profile_base::sensu::manage_user: false
profile_base::sensu::windows_pkg_url: 'http://artifactory.domain.local/sensu/msi/2012r2/sensu-0.28.5-2-x64.msi'So without Checked and not sure if this is correct but his git config |
|
@cdenneen I appreciate all the effort on this. We aren't planning to support running tests from a windows host and we don't have the platform to test with. If there's an issue with the module running on Windows, we certainly do want to get that fixed. Is that the case or is the issue only with running acceptance tests? If you can figure out how to get the acceptance tests to work with windows, we are more than happy to accept a pull request. |
When trying to install Sensu fresh on a Win2012R2 server, I get the following error:
Invalid relationship: File[C:/opt/sensu/ssl] {require => Package[sensu]}, because Package[sensu] doesn't seem to be in the catalogI have a feeling it's because the module is expecting to see a package called 'sensu' whereas on Windows, the package name gets changed to 'Sensu' (uppercase S) and this is throwing the module right off.
Is this a known issue and is there a fix somewhere?
The text was updated successfully, but these errors were encountered: