On 25/08/11 15:14, Andrew Beekhof wrote:
You cant set QMF filters on a method result though, which makes
answering "give me the list of totally unconfigured nodes" very
"iterative" in big deployments.
As it stands, all it is doing is caching the last result of the
is_configured method, which is meaningless since it takes into account
neither the key passed to the method nor any configuration that has
occurred since we last called the method.
So we should work out what we _actually_ want to filter on, implement
that and change the name accordingly.
On Thu, Aug 25, 2011 at 10:08 PM, Russell Bryant<rbryant(a)redhat.com> wrote:
> This bug reported a sysconfig agent crash due to an unhandled exception
> when the is_postboot_configured property was set to an incompatible
> value (string instead of an int).
>
> In my opinion, this property should just be removed. �Any intended usage
> of this flag should be replaced with using the is_configured method.
>
> Signed-off-by: Russell Bryant<rbryant(a)redhat.com>
> ---
> �src/sysconfig/schema.xml � � � �| � �1 -
> �src/sysconfig/sysconfig-qmf.cpp | � �2 --
> �2 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/src/sysconfig/schema.xml b/src/sysconfig/schema.xml
> index 24197c6..7f11043 100644
> --- a/src/sysconfig/schema.xml
> +++ b/src/sysconfig/schema.xml
> @@ -4,7 +4,6 @@
> � �<class name="Sysconfig">
> � � � �<property name="uuid" � � � � � � � � � type="sstr"
access="RO" desc="Host UUID" />
> � � � �<property name="hostname" � � � � � � � type="sstr"
access="RO" desc="Hostname" index="y"/>
> - � � � �<property name="is_postboot_configured" type="uint32"
access="RO" desc="Check if agent is configured." />
>
> � � � �<statistic name="qmf-gen-no-crash" type="absTime"
desc="Dummy stat to stop qmf-gen from crashing." />
>
> diff --git a/src/sysconfig/sysconfig-qmf.cpp b/src/sysconfig/sysconfig-qmf.cpp
> index 442d27a..6cbe54b 100644
> --- a/src/sysconfig/sysconfig-qmf.cpp
> +++ b/src/sysconfig/sysconfig-qmf.cpp
> @@ -69,7 +69,6 @@ ConfigAgent::setup(qmf::AgentSession session)
>
> � � _instance.setProperty("hostname", mh_hostname());
> � � _instance.setProperty("uuid", mh_uuid());
> - � �_instance.setProperty("is_postboot_configured", 0);
>
> � � session.addData(_instance, SYSCONFIG_NAME);
> � � return 0;
> @@ -109,7 +108,6 @@ ConfigAgent::invoke(qmf::AgentSession session, qmf::AgentEvent
event, gpointer u
> � � � � event.addReturnArgument("query", data);
> � � } else if (methodName == "is_configured") {
> � � � � status =
mh_sysconfig_is_configured(args["key"].asString().c_str());
> - � � � �_instance.setProperty("is_postboot_configured", status);
> � � � � event.addReturnArgument("status", status);
> � � } else {
> � � � � session.raiseException(event, MH_NOT_IMPLEMENTED);
> --
> 1.7.6
>
> _______________________________________________
> Matahari mailing list
> Matahari(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/matahari
>
_______________________________________________
Matahari mailing list
Matahari(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/matahari