[PATCH] - Add Kerberos export information to manual
by Adam Stokes
- Describes what env variables to set in order
to alter a couple of items for k5start like
a custom keytab and interval settings for checking
on ticket cache.
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
en-US/Security.xml | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/en-US/Security.xml b/en-US/Security.xml
index 8a508d5..8882af5 100644
--- a/en-US/Security.xml
+++ b/en-US/Security.xml
@@ -95,16 +95,22 @@ Valid starting Expires Service principal
<para>For long running agents we want to make sure our agents have a
renewable kerberos ticket so that re-autenctication is not necessary.
An application is needed for this called
- <application><command>k5start</command></application>. The
- administrator of the agent needs to make sure this is running if they
- wish to refresh kerberos tickets without any further
- interaction.</para>
-
- <screen><prompt>#</prompt> <userinput>k5start -f /etc/krb5.keytab -K 10 -l 10h qpidd/HAMMER</userinput></screen>
-
- <para>What this command is doing is setting a lifetime of 10 hours and
- periodically checking the expiration of the ticket every 10 minutes.
- Further information or examples can be found in the
+ <application><command>k5start</command></application> and is invoked
+ automatically if found. There are a couple of environment variables
+ that may be set in order to alter <application><command>k5start</command>
+ </application> startup behavior. For example, in order to alter where
+ the keytab file is found and also how long <application><command>k5start
+ </command></application> should wait before checking the ticket cache we
+ could run our agents like:</para>
+
+ <screen><prompt>#</prompt> <userinput>export KRB5_KEYTAB=/etc/matahari-agent.keytab</userinput>
+<prompt>#</prompt> <userinput>export KRB5_INTERVAL=20</userinput>
+<prompt>#</prompt> <userinput>service matahari-sysconfig start</userinput></screen>
+
+ <para>What <application><command>k5start</command></application> is
+ is doing is periodically checking the expiration of the ticket every
+ 10 minutes and is only reading the first principal from the defined
+ keytab file. Further information or examples can be found in the
<command>k5start</command> man page. <note>
<para>Windows does not have anything similar to
<application><command>k5start</command></application>. A windows
--
1.7.6.2
12 years, 8 months
Qpid cpp-client plugins not loaded with sudo
by Zane Bitter
I have recently discovered the hard way that the SSL plugin does not get
loaded when the client is run using sudo, resulting in various error
messages about ssl being an invalid protocol. The plugin is loaded
correctly when run from a root shell started with su (or ssh).
This should be easily reproducible on Fedora 15 with the current
versions of qpid-cpp-client and qpid-cpp-client-ssl (0.10-2.fc15):
$ sudo qmf-tool amqp:ssl:localhost
Failed: RuntimeError - Invalid URL: amqp:ssl:localhost (qpid/Url.cpp:237)
Is this a known/intended effect?
thanks,
Zane.
12 years, 8 months
[PATCH] - Make sure to clean up old named processes from pre 0.4.2
by Adam Stokes
- There is an issue with upgrading packages from 0.4.0
to 0.4.2 or later where we've renamed the agent daemons.
Original naming scheme was `matahari-<agent>d` whereas the
new binaries are named `matahari-qmf-<agent>d` to differentiate
between dbus and qmf. So we want to make sure that anyone
upgrading from 0.4.0 will properly have their old services
cleaned up.
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
matahari.init.in | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/matahari.init.in b/matahari.init.in
index 75f9739..8a3cc1c 100644
--- a/matahari.init.in
+++ b/matahari.init.in
@@ -26,6 +26,10 @@
SERVICE=matahari-@BASE@@BASE_SUB@
PROCESS=matahari-qmf-@BASE@@BASE_SUB@d
+# Old process naming convention, this is here
+# for compability sake when starting/stopping the
+# service from an upgrade of 0.4.0 > 0.4.2
+OLDPROCESS=matahari-@BASE@@BASE_SUB@d
RETVAL=0
@@ -51,8 +55,16 @@ start() {
stop() {
echo -n $"Stopping the $SERVICE daemon: "
- killproc $PROCESS
+ # Check for OLDPROCESS for pre 0.4.2 compat
+ pidofproc $OLDPROCESS >/dev/null
RETVAL=$?
+ if [ $RETVAL -lt 3 ]; then
+ killproc $OLDPROCESS
+ RETVAL=$?
+ else
+ killproc $PROCESS
+ RETVAL=$?
+ fi
echo
if [ $RETVAL -eq 0 ]; then
rm -f @localstatedir@/lock/subsys/$SERVICE
--
1.7.6.2
12 years, 8 months
[PATCH] Check/run k5start within agent code v4
by Adam Stokes
- Verify k5start exists
- Run k5start and check the top most principal (without
this we would need to probably do some regexing through the
klist to attempt to find which principal we want)
- This will re-initialization *existing* kerberos tickets without
need for password.
- Actually show none connection options as a result of more kerberos
work
- Uses environment variables and has general defaults as a fallback
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
matahari.init.in | 5 ----
matahari.sysconf.in | 14 +-----------
src/lib/mh_agent.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 57 insertions(+), 20 deletions(-)
diff --git a/matahari.init.in b/matahari.init.in
index cb215de..75f9739 100644
--- a/matahari.init.in
+++ b/matahari.init.in
@@ -42,11 +42,6 @@ start() {
MATAHARI_ARGS="--broker $MATAHARI_BROKER $MATAHARI_ARGS"
fi
- # Setup kerberos ticket renewal
- if [ -n "$KRB_RENEW" ]; then
- k5start $KRB_RENEW_ARGS $KRB_REALM
- fi
-
daemon $PROCESS $MATAHARI_ARGS --daemon
RETVAL=$?
echo
diff --git a/matahari.sysconf.in b/matahari.sysconf.in
index bc25e73..a936c27 100644
--- a/matahari.sysconf.in
+++ b/matahari.sysconf.in
@@ -17,16 +17,4 @@ MATAHARI_AGENT_ARGS="--reconnect=yes"
# network_AGENT_ARGS=...
# Per console options
-# sysconfig_CONSOLE_ARGS=...
-
-# Security
-# Kerberos
-
-# Uncomment to enable auto-renew credentials
-# KRB_RENEW=yes
-
-# Set custom application and arguments for renew process
-# KRB_RENEW_ARGS="-f /etc/krb5.keytab -K 10 -l 10h"
-
-# Kerberos REALM
-# KRB_REALM="qpidd/EXAMPLE.COM"
+# sysconfig_CONSOLE_ARGS=...
\ No newline at end of file
diff --git a/src/lib/mh_agent.cpp b/src/lib/mh_agent.cpp
index 61f32bf..8645101 100644
--- a/src/lib/mh_agent.cpp
+++ b/src/lib/mh_agent.cpp
@@ -234,8 +234,7 @@ int print_help(int code, const char *name, const char *arg, void *userdata)
printf("\nOptions:\n");
printf("\t-h | --help print this help message.\n");
for (lpc = 0; lpc < DIMOF(matahari_options); lpc++) {
- if (matahari_options[lpc].callback
- && matahari_options[lpc].callback != connection_option) {
+ if (matahari_options[lpc].callback) {
printf("\t-%c | --%-10s\t%s\n", matahari_options[lpc].code,
matahari_options[lpc].long_name, matahari_options[lpc].description);
}
@@ -251,6 +250,48 @@ mh_connect(OptionsMap mh_options, OptionsMap amqp_options, int retry)
int backoff = 0;
GList *srv_records = NULL, *cur_srv_record = NULL;
struct mh_dnssrv_record *record;
+ GError *error = NULL;
+ int status;
+ const gchar *k5start_bin[] = {
+ "/usr/bin/k5start",
+ "-U",
+ "-f",
+ mh_options["krb5_keytab"].asString().c_str(),
+ "-K",
+ mh_options["krb5_interval"].asString().c_str(),
+ NULL,
+ };
+
+ mh_trace("kerberos: %s %s %s %s %s %s",
+ k5start_bin[0],
+ k5start_bin[1],
+ k5start_bin[2],
+ k5start_bin[3],
+ k5start_bin[4],
+ k5start_bin[5]);
+
+ /* Attempt to initiate k5start for credential renewal's without
+ * prompting for a password each time an agent is run
+ */
+ if (strcmp(amqp_options["sasl-mechanism"].asString().c_str(),"GSSAPI") == 0) {
+ if (g_file_test(k5start_bin[0], G_FILE_TEST_IS_EXECUTABLE)) {
+ mh_trace("Running k5start");
+ if (!g_spawn_sync(
+ NULL,
+ (gchar **) k5start_bin,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &status,
+ &error)) {
+ mh_warn("k5start failure: %s", error->message);
+ g_error_free(error);
+ }
+ }
+ }
if (!mh_options.count("servername") || mh_options.count("dns-srv")) {
/*
@@ -342,6 +383,19 @@ read_environment(OptionsMap& options)
if (data && strlen(data)) {
options["serverport"] = data;
}
+ data = getenv("KRB5_KEYTAB");
+ if (data && strlen(data)) {
+ options["krb5_keytab"] = data;
+ } else {
+ options["krb5_keytab"] = "/etc/krb5.keytab";
+ }
+
+ data = getenv("KRB5_INTERVAL");
+ if (data && strlen(data)) {
+ options["krb5_interval"] = data;
+ } else {
+ options["krb5_interval"] = "10";
+ }
}
static void
--
1.7.6.2
12 years, 8 months
[PATCH] Check/run k5start within agent code v2
by Adam Stokes
- Verify k5start exists
- Run k5start and check the top most principal (without
this we would need to probably do some regexing through the
klist to attempt to find which principal we want)
- This will re-initialization *existing* kerberos tickets without
need for password.
- Actually show none connection options as a result of more kerberos
work
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
src/lib/mh_agent.cpp | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/lib/mh_agent.cpp b/src/lib/mh_agent.cpp
index 61f32bf..e589af1 100644
--- a/src/lib/mh_agent.cpp
+++ b/src/lib/mh_agent.cpp
@@ -234,8 +234,7 @@ int print_help(int code, const char *name, const char *arg, void *userdata)
printf("\nOptions:\n");
printf("\t-h | --help print this help message.\n");
for (lpc = 0; lpc < DIMOF(matahari_options); lpc++) {
- if (matahari_options[lpc].callback
- && matahari_options[lpc].callback != connection_option) {
+ if (matahari_options[lpc].callback) {
printf("\t-%c | --%-10s\t%s\n", matahari_options[lpc].code,
matahari_options[lpc].long_name, matahari_options[lpc].description);
}
@@ -251,6 +250,17 @@ mh_connect(OptionsMap mh_options, OptionsMap amqp_options, int retry)
int backoff = 0;
GList *srv_records = NULL, *cur_srv_record = NULL;
struct mh_dnssrv_record *record;
+ GError *error = NULL;
+ gboolean ret;
+ const gchar *k5start_bin[] = {
+ "/usr/bin/k5start",
+ "-f",
+ "/etc/krb5.keytab",
+ "-K",
+ "10",
+ "-U",
+ NULL,
+ };
if (!mh_options.count("servername") || mh_options.count("dns-srv")) {
/*
@@ -322,6 +332,20 @@ mh_connect(OptionsMap mh_options, OptionsMap amqp_options, int retry)
}
}
}
+ /* Attempt to initiate k5start for credential renewal's without prompting for a
+ * password each time an agent is run
+ */
+ if (mh_options.count("sasl-mechanism")) {
+ if (g_file_test(k5start_bin[0], G_FILE_TEST_IS_EXECUTABLE)) {
+ mh_trace("Running k5start");
+ ret = g_spawn_async(NULL, (gchar **) k5start_bin, NULL, G_SPAWN_SEARCH_PATH,
+ NULL, NULL, NULL, &error);
+ if (ret == FALSE) {
+ mh_warn("Unable to initialize kerberos automatic ticket renewal: %s", error->message);
+ g_error_free(error);
+ }
+ }
+ }
bail:
g_list_free_full(srv_records, mh_dnssrv_record_free);
return NULL;
--
1.7.6.2
12 years, 8 months
[PATCH] Check/run k5start within agent code v3
by Adam Stokes
- Verify k5start exists
- Run k5start and check the top most principal (without
this we would need to probably do some regexing through the
klist to attempt to find which principal we want)
- This will re-initialization *existing* kerberos tickets without
need for password.
- Actually show none connection options as a result of more kerberos
work
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
src/lib/mh_agent.cpp | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/src/lib/mh_agent.cpp b/src/lib/mh_agent.cpp
index 61f32bf..dbe35c8 100644
--- a/src/lib/mh_agent.cpp
+++ b/src/lib/mh_agent.cpp
@@ -234,8 +234,7 @@ int print_help(int code, const char *name, const char *arg, void *userdata)
printf("\nOptions:\n");
printf("\t-h | --help print this help message.\n");
for (lpc = 0; lpc < DIMOF(matahari_options); lpc++) {
- if (matahari_options[lpc].callback
- && matahari_options[lpc].callback != connection_option) {
+ if (matahari_options[lpc].callback) {
printf("\t-%c | --%-10s\t%s\n", matahari_options[lpc].code,
matahari_options[lpc].long_name, matahari_options[lpc].description);
}
@@ -251,6 +250,39 @@ mh_connect(OptionsMap mh_options, OptionsMap amqp_options, int retry)
int backoff = 0;
GList *srv_records = NULL, *cur_srv_record = NULL;
struct mh_dnssrv_record *record;
+ GError *error = NULL;
+ int status;
+ const gchar *k5start_bin[] = {
+ "/usr/bin/k5start",
+ "-f",
+ "/etc/krb5.keytab",
+ "-K",
+ "10",
+ "-U",
+ NULL,
+ };
+ /* Attempt to initiate k5start for credential renewal's without
+ * prompting for a password each time an agent is run
+ */
+ if (strcmp(amqp_options["sasl-mechanism"].asString().c_str(),"GSSAPI") == 0) {
+ if (g_file_test(k5start_bin[0], G_FILE_TEST_IS_EXECUTABLE)) {
+ mh_trace("Running k5start");
+ if (!g_spawn_sync(
+ NULL,
+ (gchar **) k5start_bin,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &status,
+ &error)) {
+ mh_warn("k5start failure: %s", error->message);
+ g_error_free(error);
+ }
+ }
+ }
if (!mh_options.count("servername") || mh_options.count("dns-srv")) {
/*
--
1.7.6.2
12 years, 8 months
Notes on Releases
by Russell Bryant
Greetings,
I have put together some notes on releases that I intend to put on the
project wiki. I wanted to post it here first to make it easier to
review and discuss.
# Matahari Releases
## Version Numbers
X.Y.Z
* ```X``` - Milestone
* Updated once the project maintainers decide that a significant
milestone in the project's evolution has been reached.
* ```Y``` - Major
* Updated when the feature set is changed.
* ```Z``` - Minor
* Updated for releases that primarily contain bug fixes and other
minor changes.
## Ongoing Releases
Matahari is under heavy development. While features are regularly being
added, we intend to make an ```X.Y.0``` release monthly.
Occasionally (based on demand and what we get into various
distributions) we will maintain an ```X.Y``` release series. For a
maintained version, we will make ```X.Y.Z``` releases monthly if there
have been fixes applied.
## Current Release Status
These are the ```X.Y``` releases currently being maintained:
* ```0.4```
** Included in Fedora 15, Fedora 16, RHEL 6.2
Fedora rawhide will be continuously updated with the latest ```X.Y```
release.
## Mechanics
### Branches
Main development occurs in ```master```.
There may also be one or more release branches currently being
maintained, such as ```v0.4```. See the Current Status section for
current information.
For every change that applies to a maintained release, commit there
first and merge to ```master```. Once the release branch is far enough
out of sync with ```master```, we will switch to using ```git
cherry-pick``` to ```master```.
--
Russell Bryant
12 years, 8 months
[PATCH] - Check/run k5start within agent code
by Adam Stokes
- Verify k5start exists
- Run k5start and check the top most principal (without
this we would need to probably do some regexing through the
klist to attempt to find which principal we want)
- This will re-initialization *existing* kerberos tickets without
need for password.
- Actually show none connection options as a result of more kerberos
work
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
src/lib/mh_agent.cpp | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/lib/mh_agent.cpp b/src/lib/mh_agent.cpp
index bb1a9b6..00cafda 100644
--- a/src/lib/mh_agent.cpp
+++ b/src/lib/mh_agent.cpp
@@ -232,8 +232,7 @@ int print_help(int code, const char *name, const char *arg, void *userdata)
printf("\nOptions:\n");
printf("\t-h | --help print this help message.\n");
for (lpc = 0; lpc < DIMOF(matahari_options); lpc++) {
- if (matahari_options[lpc].callback
- && matahari_options[lpc].callback != connection_option) {
+ if (matahari_options[lpc].callback) {
printf("\t-%c | --%-10s\t%s\n", matahari_options[lpc].code,
matahari_options[lpc].long_name, matahari_options[lpc].description);
}
@@ -249,6 +248,16 @@ mh_connect(OptionsMap mh_options, OptionsMap amqp_options, int retry)
int backoff = 0;
GList *srv_records = NULL, *cur_srv_record = NULL;
struct mh_dnssrv_record *record;
+ GError *error = NULL;
+ gboolean ret;
+ const gchar *k5start_bin[] = {
+ "/usr/bin/k5start",
+ "-f",
+ "/etc/krb5.keytab",
+ "-K",
+ "10",
+ "-U",
+ };
if (!mh_options.count("servername") || mh_options.count("dns-srv")) {
/*
@@ -320,6 +329,20 @@ mh_connect(OptionsMap mh_options, OptionsMap amqp_options, int retry)
}
}
}
+ /* Attempt to initiate k5start for credential renewal's without prompting for a
+ * password each time an agent is run
+ */
+ if (mh_options.count("sasl-mechanism")) {
+ if (g_file_test(k5start_bin[0], G_FILE_TEST_IS_EXECUTABLE)) {
+ mh_info("Running k5start");
+ ret = g_spawn_async(NULL, (gchar **) k5start_bin, NULL, G_SPAWN_SEARCH_PATH,
+ NULL, NULL, NULL, &error);
+ if (ret == FALSE) {
+ mh_warn("Unable to initialize kerberos automatic ticket renewal: %s", error->message);
+ g_error_free(error);
+ }
+ }
+ }
bail:
g_list_free_full(srv_records, mh_dnssrv_record_free);
return NULL;
--
1.7.6.2
12 years, 8 months
[PATCH] - Support for easy provisioning and installation of matahari
by Adam Stokes
- Uses puppet for easy configuration and package installation
- A simple kickstart script intended to be included in a existing
kickstart configuration
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
contrib/kickstart/matahari-win.ks | 3 +
contrib/kickstart/matahari.ks | 10 +++++
contrib/puppet/README | 3 +
.../puppet/lib/puppet/provider/service/systemd.rb | 42 ++++++++++++++++++++
contrib/puppet/lib/puppet/type/systemd.rb | 18 ++++++++
contrib/puppet/manifests/modules.pp | 1 +
contrib/puppet/manifests/site.pp | 3 +
contrib/puppet/modules/matahari/manifests/init.pp | 28 +++++++++++++
contrib/puppet/modules/yum/manifests/init.pp | 25 ++++++++++++
9 files changed, 133 insertions(+), 0 deletions(-)
create mode 100644 contrib/kickstart/matahari-win.ks
create mode 100644 contrib/kickstart/matahari.ks
create mode 100644 contrib/puppet/README
create mode 100644 contrib/puppet/lib/puppet/provider/service/systemd.rb
create mode 100644 contrib/puppet/lib/puppet/type/systemd.rb
create mode 100644 contrib/puppet/manifests/modules.pp
create mode 100644 contrib/puppet/manifests/site.pp
create mode 100644 contrib/puppet/modules/matahari/manifests/init.pp
create mode 100644 contrib/puppet/modules/yum/manifests/init.pp
diff --git a/contrib/kickstart/matahari-win.ks b/contrib/kickstart/matahari-win.ks
new file mode 100644
index 0000000..10e6252
--- /dev/null
+++ b/contrib/kickstart/matahari-win.ks
@@ -0,0 +1,3 @@
+%packages
+mingw32-matahari
+%end
diff --git a/contrib/kickstart/matahari.ks b/contrib/kickstart/matahari.ks
new file mode 100644
index 0000000..8557021
--- /dev/null
+++ b/contrib/kickstart/matahari.ks
@@ -0,0 +1,10 @@
+%packages
+matahari
+matahari-agent-lib
+matahari-service
+matahari-broker
+matahari-host
+matahari-net
+matahari-lib
+!matahari-devel
+%end
diff --git a/contrib/puppet/README b/contrib/puppet/README
new file mode 100644
index 0000000..278c8f6
--- /dev/null
+++ b/contrib/puppet/README
@@ -0,0 +1,3 @@
+Within the contrib/puppet directory run:
+
+# sudo RUBYLIB=lib/ puppet --modulepath=modules/ --verbose manifests/site.pp
\ No newline at end of file
diff --git a/contrib/puppet/lib/puppet/provider/service/systemd.rb b/contrib/puppet/lib/puppet/provider/service/systemd.rb
new file mode 100644
index 0000000..9a0fca4
--- /dev/null
+++ b/contrib/puppet/lib/puppet/provider/service/systemd.rb
@@ -0,0 +1,42 @@
+Puppet::Type.type(:service).provide :systemd,
+ :parent => :init, :source => :init do
+
+ desc "execute systemd service using systemctl"
+
+ commands :service => "/bin/systemctl"
+ defaultfor :operatingsystem => [:fedora]
+ def self.defpath
+ superclass.defpath
+ end
+
+ def disable
+ [command(:service), "disable", @resource[:name]]
+ end
+
+ def enabled?
+ system("/bin/systemctl", "is-enabled", @resource[:name])
+ if [0].include?($CHILD_STATUS.exitstatus)
+ return :true
+ else
+ return :false
+ end
+ end
+
+ def enable
+ output = service(:enable, @resource[:name])
+ rescue Puppet::ExecutionFailure => detail
+ raise Puppet::Error, "Could not enable #{self.name}: #{detail}"
+ end
+
+ def restartcmd
+ [command(:service), "restart", @resource[:name]]
+ end
+
+ def startcmd
+ [command(:service), "start", @resource[:name]]
+ end
+
+ def stopcmd
+ [command(:service), "stop", @resource[:name]]
+ end
+end
diff --git a/contrib/puppet/lib/puppet/type/systemd.rb b/contrib/puppet/lib/puppet/type/systemd.rb
new file mode 100644
index 0000000..c94a516
--- /dev/null
+++ b/contrib/puppet/lib/puppet/type/systemd.rb
@@ -0,0 +1,18 @@
+require 'puppet/type'
+
+Puppet::Type.newtype :systemd do
+ @doc = "Run service via systemd"
+
+ newparam :service do
+ desc "Name of service"
+ end
+
+ newparam :action do
+ desc "Start/Stop/Restart service"
+ end
+
+ ensurable do
+ defaultvalues
+ defaultto :start
+ end
+end
diff --git a/contrib/puppet/manifests/modules.pp b/contrib/puppet/manifests/modules.pp
new file mode 100644
index 0000000..e5b1959
--- /dev/null
+++ b/contrib/puppet/manifests/modules.pp
@@ -0,0 +1 @@
+import "matahari"
diff --git a/contrib/puppet/manifests/site.pp b/contrib/puppet/manifests/site.pp
new file mode 100644
index 0000000..a254b49
--- /dev/null
+++ b/contrib/puppet/manifests/site.pp
@@ -0,0 +1,3 @@
+import "modules.pp"
+
+include matahari::base
diff --git a/contrib/puppet/modules/matahari/manifests/init.pp b/contrib/puppet/modules/matahari/manifests/init.pp
new file mode 100644
index 0000000..3cd830d
--- /dev/null
+++ b/contrib/puppet/modules/matahari/manifests/init.pp
@@ -0,0 +1,28 @@
+class matahari::base {
+ notice("Matahari manifests begin")
+
+ $packagelist = [
+ "matahari-host",
+ "matahari-network",
+ "matahari-service",
+ "matahari-sysconfig",
+ "matahari-lib",
+ "matahari-agent-lib",
+ "matahari-broker",
+ "matahari"]
+ package {
+ $packagelist: ensure => latest
+ }
+
+ $serlist = [
+ "matahari-host.service",
+ "matahari-network.service",
+ "matahari-sysconfig.service",
+ "matahari-service.service",
+ "matahari-broker.service"]
+ service {
+ $serlist:
+ ensure => stopped,
+ enable => true
+ }
+}
diff --git a/contrib/puppet/modules/yum/manifests/init.pp b/contrib/puppet/modules/yum/manifests/init.pp
new file mode 100644
index 0000000..9a8e8f4
--- /dev/null
+++ b/contrib/puppet/modules/yum/manifests/init.pp
@@ -0,0 +1,25 @@
+class matahari::yum {
+ package {
+ yum: ensure => installed
+ }
+
+ file {
+ fedora-updates:
+ name => '/etc/yum.repos.d/fedora-updates.repo',
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 600,
+ require => Package["yum"],
+ }
+
+ yumrepo {
+ fedora-updates:
+ descr => 'fedora-updates',
+ baseurl => 'http://download.fedoraproject.org/pub/fedora/linux/updates/16/x86_64/',
+ enabled => 1,
+ gpgcheck => 0,
+ gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora',
+ require => File["fedora-updates"];
+ }
+}
--
1.7.6.2
12 years, 8 months
[PATCHv2 0/7] rhbz#737137 - Various Sysconfig Improvements.
by Russell Bryant
Greetings,
This patchset is for the sysconfig API and QMF agent. The meat of the
changes are in patch 3/7, where the core API gets reworked to utilize
the services library for running a task in the background and geting
an asynchronous callback with the result. This is to ensure that
the result of executing puppet is known and is reported back.
Previously, we always reported success.
Patches 6 and 7 are new in v2 of this patch series. Patch 6 ensures
that the Sysconfig agent is compatible with the version of puppet
currently in Fedora. Patch 7 catches more errors from curl so that
we don't invoke puppet on bogus data (such as the HTML of a 404 page).
[PATCHv2 1/7] services: Don't make array length assumption.
[PATCHv2 2/7] sysconfig: create sysconfig_internal.h
[PATCHv2 3/7] sysconfig: Pay attention to results from puppet.
[PATCHv2 4/7] sysconfig: updates to unit tests
[PATCHv2 5/7] sysconfig: Make sure key is non-empty.
[PATCHv2 6/7] sysconfig: Support older versions of puppet.
[PATCHv2 7/7] sysconfig: Detect more failures with curl.
matahari.spec.in | 2
src/include/matahari/services.h | 30 +++
src/include/matahari/sysconfig.h | 47 ++---
src/include/matahari/sysconfig_internal.h | 47 +++++
src/lib/CMakeLists.txt | 2
src/lib/services.c | 33 +++
src/lib/services_linux.c | 7
src/lib/sysconfig.c | 44 +++-
src/lib/sysconfig_linux.c | 272 ++++++++++++++++++++++++------
src/lib/sysconfig_private.h | 4
src/lib/sysconfig_windows.c | 52 +++--
src/sysconfig/sysconfig-qmf.cpp | 74 +++++++-
src/tests/mh_api_sysconfig.h | 14 -
13 files changed, 509 insertions(+), 119 deletions(-)
Thanks,
--
Russell Bryant
12 years, 8 months