[PATCH] fix agent initscript failure on boot
by apevec@redhat.com
SysV symlink was not resolved leading to wrong daemon name:
Starting S99matahari-host daemon: /bin/bash: S99matahari-hostd: command
not found
---
matahari.init.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/matahari.init.in b/matahari.init.in
index d6ec380..134bb04 100644
--- a/matahari.init.in
+++ b/matahari.init.in
@@ -19,7 +19,8 @@
# Source function library.
. @sysconfdir(a)/rc.d/init.d/functions
-SERVICE=`basename "$0"`
+SERVICE=`readlink -f "$0"`
+SERVICE=`basename "$SERVICE"`
PROCESS=`echo "$SERVICE"d`
RETVAL=0
--
1.7.3.4
13 years, 3 months
Stricter compilation
by Andrew Beekhof
The cross-compiler is far too lenient wrt. what it lets through.
As such, and consistent with the other projects I look after, I will
be updating the CFLAGS to use -Werror.
This means the compiler will treat all warnings as errors.
I've made the necessary changes to allow the core code and services
agent to compile with the new flag.
[PATCH] Core: Fix compilation with -Werror
Could everyone please apply the following patch and fix up any of
their pieces that no longer compile.
-- Andrew
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5749656..24b7576 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -12,8 +12,8 @@ else(WIN32)
set(VARIANT "linux")
endif(WIN32)
-set(CMAKE_C_FLAGS "-Wall")
-set(CMAKE_CXX_FLAGS "-Wall")
+set(CMAKE_C_FLAGS "-Wall -Werror")
+set(CMAKE_CXX_FLAGS "-Wall -Werror")
set(MCOMMON_VERSION 0.0.1)
set(MHOST_VERSION 0.0.1)
13 years, 4 months
Updated patch
by Carl Trieloff
Note that I have not yet updated the makefile, as I still pull a
function from hosts.h, note the TBD in
the code next to this line. This is probably a reasonable baseline if we
want to commit it.
Output from a test run showing the full lifecycle working correctly:
(pre_register)
Agent cache:{_instance:6937c86b-fcae-405c-bde3-5d545ac3bd62,
_name:matahariproject.org:mantahari-config:6937c86b-fcae-405c-bde3-5d545ac3bd62,
_product:mantahari-config, _vendor:matahariproject.org, cache:True,
heartbeat_interval:60, qmf.agent_capability:1,
schemaUpdated:1293027624423704932, timestamp:1293027628574731257}
Cache result [0]:{config_xml:config... fooo, status:Pending, uuid:myuuid}
(guest waiting for config from cache)
Agent machine:{_instance:6cedfeb4-3fbd-47d1-acf3-3d406170682b,
_name:matahariproject.org:mantahari-config:6cedfeb4-3fbd-47d1-acf3-3d406170682b,
_product:mantahari-config, _vendor:matahariproject.org, cache:False,
heartbeat_interval:60, qmf.agent_capability:1,
schemaUpdated:1293027640289416415, timestamp:1293027640334367174}
Cache result [0]:{my_conf_addr:cctrieloff, status:Waiting for
configuration from cache, uuid:myuuid}
(Cache and guest updated and synced)
Agent cache:{_instance:6937c86b-fcae-405c-bde3-5d545ac3bd62,
_name:matahariproject.org:mantahari-config:6937c86b-fcae-405c-bde3-5d545ac3bd62,
_product:mantahari-config, _vendor:matahariproject.org, cache:True,
heartbeat_interval:60, qmf.agent_capability:1,
schemaUpdated:1293027624423704932, timestamp:1293027628574731257}
Cache result
[0]:{config_hosts:matahariproject.org:mantahari-config:6937c86b-fcae-405c-bde3-5d545ac3bd62,
config_xml:config... fooo, my_conf_addr:cctrieloff,
parameter_map:<void>, status:Synced and running, uuid:myuuid}
Agent machine:{_instance:6cedfeb4-3fbd-47d1-acf3-3d406170682b,
_name:matahariproject.org:mantahari-config:6cedfeb4-3fbd-47d1-acf3-3d406170682b,
_product:mantahari-config, _vendor:matahariproject.org, cache:False,
heartbeat_interval:60, qmf.agent_capability:1,
schemaUpdated:1293027640289416415, timestamp:1293027640334367174}
Cache result
[0]:{config_hosts:matahariproject.org:mantahari-config:6937c86b-fcae-405c-bde3-5d545ac3bd62,
config_xml:config... fooo, my_conf_addr:cctrieloff, status:Synced and
running, uuid:myuuid}
13 years, 4 months
Patch series improving Windows installation and implementing the Services agent on Windows
by Andrew Beekhof
[PATCH 01/13] Windows: Read the preferred broker location from the registry
[PATCH 02/13] Windows: Set a default broker location in the registry during install
[PATCH 03/13] Windows: Stop services before we try to delete them and complete the installation
[PATCH 04/13] Windows: Install the services agent
[PATCH 05/13] Windows: Have all agents log to stderr by default
[PATCH 06/13] Windows: Set up a consistent windows environment using MinGW's unicode functions and WinXP compatability
[PATCH 07/13] Windows: Switch to a registry path that we can read/write and make it possible to set other agent parameters
[PATCH 08/13] Services: Correctly create a unicode command line for windows
[PATCH 09/13] Core: Automatically supply the correct line endings for Windows
[PATCH 10/13] Core: Provide enums for the two sets of LSB return codes
[PATCH 11/13] Services: Return accurate exit codes on Windows
[PATCH 12/13] Core: Support debug logging on Windows
[PATCH 13/13] Build: Delete the windows service binaries on uninstall
13 years, 4 months
patch update
by Carl Trieloff
Here is a patch with the feedback from Andrew incorporated +it should match
the update of Qpid/ QMF being pushed to fedora.
I'll wait for any final comments and then push it to a GIT branch for
others to start
using.
Carl.
13 years, 4 months
[PATCH 1/3] distinguish matahari-broker from system qpidd
by apevec@redhat.com
Fix service matahari-broker status to look at its pid/lockfile.
Note that service qpidd status might still pick matahari-broker started
qpidd instead of its own.
---
matahari-broker.init.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/matahari-broker.init.in b/matahari-broker.init.in
index f05fbb6..8492278 100755
--- a/matahari-broker.init.in
+++ b/matahari-broker.init.in
@@ -87,7 +87,7 @@ case "$1" in
$1
;;
status)
- status $prog
+ status -p $pidfile -l $lockfile $prog
RETVAL=$?
;;
force-reload)
--
1.7.3.4
13 years, 4 months
[PATCH 2/3] update descriptions in agent initscript and spec
by apevec@redhat.com
---
matahari.init.in | 10 +++++-----
matahari.spec | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/matahari.init.in b/matahari.init.in
index 9f19b83..d6ec380 100644
--- a/matahari.init.in
+++ b/matahari.init.in
@@ -1,19 +1,19 @@
#!/bin/sh
# the following is chkconfig init header
-# matahari: host qmf agent for ovirt node
+# matahari: host management QMF agents
### BEGIN INIT INFO
# Required-Start: $local_fs matahari-broker
# Default-Start 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start/stop matahari agents
-# Description: Matahari agents provide host information using AMQP protocol
+# Description: Matahari agents provide host information using AMQP protocol.
### END INIT INFO
# chkconfig: - 99 01
-# description: This is a daemon for interacting with an ovirt server.
-# processname: matahari
-# pidfile: @localstatedir(a)/run/matahari.pid
+# description: Matahari agents provide host information using AMQP protocol.
+# processname: matahari-*
+# pidfile: @localstatedir(a)/run/matahari-*.pid
#
# Source function library.
diff --git a/matahari.spec b/matahari.spec
index f388033..85187ef 100644
--- a/matahari.spec
+++ b/matahari.spec
@@ -35,8 +35,8 @@ BuildRequires: sigar-devel
%description
-matahari provides a QMF Agent that can be used to control and manage
-various pieces of functionality for an ovirt node, using the AMQP protocol.
+Matahari provides QMF Agents that can be used to control and manage
+various pieces of functionality, using the AMQP protocol.
The Advanced Message Queuing Protocol (AMQP) is an open standard application
layer protocol providing reliable transport of messages.
@@ -56,7 +56,7 @@ Requires: qmf > 0.7
%description broker
Optional AMQP Broker for Matahari
-%package devel
+%package devel
License: GPLv2+
Summary: Matahari development package
Group: Development/Libraries
--
1.7.3.4
13 years, 4 months
[PATCH] Initialize load average struct otherwise problems occur when attempting to access nonexistent data on windows
by Adam Stokes
---
src/host/matahari-host.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/host/matahari-host.cpp b/src/host/matahari-host.cpp
index 3840665..d695f35 100644
--- a/src/host/matahari-host.cpp
+++ b/src/host/matahari-host.cpp
@@ -108,7 +108,7 @@ int
HostAgent::heartbeat()
{
uint64_t timestamp = 0L, now = 0L;
- sigar_loadavg_t avg;
+ sigar_loadavg_t avg = { 0, 0, 0 };
sigar_proc_stat_t procs;
static uint32_t _heartbeat_sequence = 1;
--
1.7.3.4
13 years, 4 months
Completed post boot agent pending Chris's piece
by Carl Trieloff
Here the tested agent waiting for Chris to hook his code in.
I will work with Dmitri next week and we will integrate the initial
kerb boot cycle. With this and Chris's piece we can test it integrated
end to end.
Carl.
13 years, 4 months
double checking on using auth credentials to restrict roles
by Perry Myers
Ted,
I know we've had this discussion before, but wanted to triple check on
this because a lot of the Matahari model depends on it.
My understand is that it is possible to restrict what role a connection to
a broker is able to take via auth credentials. For example:
* broker1 has two auth credentials defined:
- user foo: allows connections from both QMF Consoles and QMF Agents
- user bar: allows connections only from QMF Agents
With this functionality, we could provide a single broker and only give
out user foo credentials to Consoles running in protected areas (mgmt DMZ
for example). And then only provide user bar credentials to the guests
running in the Cloud so they could only ever connect to the external
broker as an Agent.
Can you please confirm this?
Thanks!
Perry
13 years, 4 months