summaryrefslogtreecommitdiffstats
path: root/__root__
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2015-03-10 19:13:57 +0100
committerJan Pokorný <jpokorny@redhat.com>2015-03-16 22:39:49 +0100
commit3075b6302eba607945e6524ca2d76cc78b9322b1 (patch)
tree4219ea848c7c0188b8ab7daac99d6ecd8d7514c4 /__root__
parent1cd32f29b9fd8a97957b637aea91f0fc859b2232 (diff)
downloadclufter-3075b6302eba607945e6524ca2d76cc78b9322b1.tar.gz
clufter-3075b6302eba607945e6524ca2d76cc78b9322b1.tar.xz
clufter-3075b6302eba607945e6524ca2d76cc78b9322b1.zip
ccs-flatten: avoid proper RA *.metadata confusion with own ones
Previously, running the CLI without proper installation on the machine with some /usr/share/cluster/*.metadata files present (typically RHEL 6 with resource-agents installed) meant that "onvenient fallback for local/test deployment" hadn't been activated, leading to various errors in the conversion due to most of the *.metadata files missing anyway (most notably for "script"). Now we take an advantage of own/embedded metadata files ending with ".sh.metadata", therefore we are not confused in this way (at least not so easily, but good enough for the time being). Reported-by: Chris Feist <cfeist@redhat.com> Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '__root__')
-rw-r--r--__root__/ccs-flatten/resrules.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/__root__/ccs-flatten/resrules.c b/__root__/ccs-flatten/resrules.c
index 4d8e485..716f88e 100644
--- a/__root__/ccs-flatten/resrules.c
+++ b/__root__/ccs-flatten/resrules.c
@@ -922,9 +922,13 @@ load_resource_rules(const char *rpath, resource_rule_t ** rules,
glob_t globbuf;
int i;
- /* jump to "convenient fallback" if there are no metadata present
+ /* jump to "convenient fallback" if there are no _own_ metadata present
+ XXX: this relies on _own_ metadata files ending with
+ ".sh.RA_METADATA_EXT" (corollary of original agents always
+ having "sh" extension, at least at the moment), but we can keep
+ an eye on that for the bundled metadata */
#ifdef RA_METADATA_EXT
- snprintf(path, sizeof(path), "%s/*.%s", rpath, RA_METADATA_EXT);
+ snprintf(path, sizeof(path), "%s/*.sh.%s", rpath, RA_METADATA_EXT);
#endif
if (!(
(dir = opendir(rpath))