Closed majormoses closed 8 years ago
@Createor can I get some info on your yum repos? I am working on this but am running into some issues:
Recipe: netuitive::add_repo
* netuitive_repo[netuitive] action add[2016-03-07T20:07:31+00:00] WARN: EPEL based system support is still in the works, please submit an issue on github for any issues you have
(up to date)
* yum_package[yum-plugin-versionlock] action install
- install version 1.1.30-30.el6 of package yum-plugin-versionlock
* yum_repository[netuitive] action create
* template[/etc/yum.repos.d/netuitive.repo] action create
- create new file /etc/yum.repos.d/netuitive.repo
- update content in file /etc/yum.repos.d/netuitive.repo from none to f4af13
--- /etc/yum.repos.d/netuitive.repo 2016-03-07 20:07:36.943557722 +0000
+++ /tmp/chef-rendered-template20160307-2963-1gl9jli 2016-03-07 20:07:36.943557722 +0000
@@ -1 +1,11 @@
+# This file was generated by Chef
+# Do NOT modify this file by hand.
+
+[netuitive]
+name=Netuitive EPEL Repo
+baseurl=https://repos.app.netuitive.com/rpm/noarch/base
+enabled=1
+gpgcheck=1
+gpgkey=https://repos.app.netuitive.com/RPM-GPG-KEY-netuitive
+priority=10
- change mode from '' to '0644'
- restore selinux security context
* execute[yum clean metadata netuitive] action run
- execute yum clean metadata --disablerepo=* --enablerepo=netuitive
* execute[yum-makecache-netuitive] action run
================================================================================
Error executing action `run` on resource 'execute[yum-makecache-netuitive]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of yum -q -y makecache --disablerepo=* --enablerepo=netuitive ----
STDOUT:
STDERR: https://repos.app.netuitive.com/rpm/noarch/base/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: netuitive. Please verify its path and try again
---- End output of yum -q -y makecache --disablerepo=* --enablerepo=netuitive ----
Ran yum -q -y makecache --disablerepo=* --enablerepo=netuitive returned 1
Resource Declaration:
---------------------
# In /tmp/kitchen/cookbooks/yum/providers/repository.rb
69: execute "yum-makecache-#{new_resource.repositoryid}" do
70: command "yum -q -y makecache --disablerepo=* --enablerepo=#{new_resource.repositoryid}"
71: action :nothing
72: only_if { new_resource.enabled }
73: end
74:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cookbooks/yum/providers/repository.rb:69:in `block in class_from_file'
execute("yum-makecache-netuitive") do
action [:nothing]
retries 0
retry_delay 2
default_guard_interpreter :execute
command "yum -q -y makecache --disablerepo=* --enablerepo=netuitive"
backup 5
returns 0
declared_type :execute
cookbook_name :netuitive
only_if { #code block }
end
================================================================================
Error executing action `create` on resource 'yum_repository[netuitive]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[yum-makecache-netuitive] (/tmp/kitchen/cookbooks/yum/providers/repository.rb line 69) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of yum -q -y makecache --disablerepo=* --enablerepo=netuitive ----
STDOUT:
STDERR: https://repos.app.netuitive.com/rpm/noarch/base/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: netuitive. Please verify its path and try again
---- End output of yum -q -y makecache --disablerepo=* --enablerepo=netuitive ----
Ran yum -q -y makecache --disablerepo=* --enablerepo=netuitive returned 1
Resource Declaration:
---------------------
# In /tmp/kitchen/cookbooks/netuitive/libraries/provider_repo.rb
46: yum_repository 'netuitive' do
47: description 'Netuitive EPEL Repo'
48: url new_resource.repo_urls['rhel'] + '/base'
49: gpgkey new_resource.repo_keys['rhel']
50: gpgcheck true
51: priority new_resource.repo_priority_pins['rhel']
52: end
53: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cookbooks/netuitive/libraries/provider_repo.rb:46:in `block in <class:NetuitiveRepoProvider>'
yum_repository("netuitive") do
action [:create]
updated true
updated_by_last_action true
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :yum_repository
cookbook_name :netuitive
description "Netuitive EPEL Repo"
baseurl "https://repos.app.netuitive.com/rpm/noarch/base"
gpgkey "https://repos.app.netuitive.com/RPM-GPG-KEY-netuitive"
gpgcheck true
priority "10"
repositoryid "netuitive"
mode "0644"
make_cache true
clean_metadata true
enabled true
end
Running handlers:
[2016-03-07T20:07:37+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-03-07T20:07:37+00:00] ERROR: Exception handlers complete
Chef Client failed. 3 resources updated in 6.719883252 seconds
[2016-03-07T20:07:37+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-03-07T20:07:37+00:00] ERROR: yum_repository[netuitive] (/tmp/kitchen/cookbooks/netuitive/libraries/provider_repo.rb line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[yum-makecache-netuitive] (/tmp/kitchen/cookbooks/yum/providers/repository.rb line 69) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of yum -q -y makecache --disablerepo=* --enablerepo=netuitive ----
STDOUT:
STDERR: https://repos.app.netuitive.com/rpm/noarch/base/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: netuitive. Please verify its path and try again
---- End output of yum -q -y makecache --disablerepo=* --enablerepo=netuitive ----
Ran yum -q -y makecache --disablerepo=* --enablerepo=netuitive returned 1
[2016-03-07T20:07:37+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@Createor this is what I was attempting: https://github.com/Netuitive/chef-netuitive/compare/master...CloudCruiser:feature/epel_support?expand=1
think its a simple matter of understanding your repo structure...
So it is! I confirmed the rhel repo url should be 'https://repos.app.netuitive.com/rpm/$basearch/'
It's worth noting that this change works in fedora, but that centos still fails later because the init script is /etc/init.d/netuitive-agent there.
@Createor I was wondering why we did not have a standard init script location, is there a reason for this?
I am not sure this is something we should be solving at a chef level and more at a package level...thoughts?
I take it back we are packaging all the different type of init scripts, we just need to detect and select
@Createor I have detection working on systemd, upstart, init.d the problem is that centos has support for upstart but the package is preferring to use init.d is there a reason for this?
will get you a branch to look at tomorrow
We currently support debian based systems and should support adding epel based systems such as centos.