ClusterLabs / crmsh

Command-line interface for High-Availability cluster management on GNU/Linux systems.
GNU General Public License v2.0
131 stars 94 forks source link

Issue setting (enable/disable) cluster properties #93

Closed kirvedx closed 9 years ago

kirvedx commented 9 years ago

When attempting to disable stonith, there is an error. Team members have said although the error occurs the property is still set appropriately; though for me it did not stick:

root@mmasx:~# crm configure property stonith-enabled=false
Traceback (most recent call last):
  File "/usr/sbin/crm", line 56, in <module>
    rc = main.run()
  File "/usr/lib/python2.7/dist-packages/crmsh/main.py", line 382, in run
    return do_work(context, user_args)
  File "/usr/lib/python2.7/dist-packages/crmsh/main.py", line 221, in do_work
    if context.run(' '.join(l)):
  File "/usr/lib/python2.7/dist-packages/crmsh/ui_context.py", line 83, in run
    self.enter_level(self.command_info.level)
  File "/usr/lib/python2.7/dist-packages/crmsh/ui_context.py", line 236, in enter_level
    if 'requires' in dir(entry) and not entry.requires():
  File "/usr/lib/python2.7/dist-packages/crmsh/ui_configure.py", line 250, in requires
    if not cib_factory.initialize():
  File "/usr/lib/python2.7/dist-packages/crmsh/cibconfig.py", line 2539, in initialize
    if not self._import_cib(cib):
  File "/usr/lib/python2.7/dist-packages/crmsh/cibconfig.py", line 2270, in _import_cib
    schema.init_schema(self.cib_elem)
  File "/usr/lib/python2.7/dist-packages/crmsh/schema.py", line 90, in init_schema
    _crm_schema = _load_schema(cib)
  File "/usr/lib/python2.7/dist-packages/crmsh/schema.py", line 85, in _load_schema
    return CrmSchema(cib, config.path.crm_dtd_dir)
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 90, in CrmSchema
    return RngSchema(cib_elem, local_dir)
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 222, in __init__
    Schema.__init__(self, cib_elem, local_dir, is_local=is_local, get_schema_fn=get_schema_fn)
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 104, in __init__
    self.refresh(cib_elem)
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 121, in refresh
    return self.update_schema()
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 227, in update_schema
    self.update_rng_docs(self.validate_name, self.schema_filename)
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 231, in update_rng_docs
    self.rng_docs[file] = self.find_start_rng_node(validate_name, file)
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 242, in find_start_rng_node
    os.path.join(self.local_dir, file))
  File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 54, in read_schema_local
    raise PacemakerError("Cannot read the schema file: " + str(msg))
crmsh.pacemaker.PacemakerError: Cannot read the schema file: [Errno 2] No such file or directory: 'pacemaker-2.0.rng'

@krig Though this issue seems like it may be a pacemaker issue instead...I'll keep digging, but this was the summary of the issue we're experiencing; everything else is working great :)

kirvedx commented 9 years ago

Ah, more errors with better clues:

checking crm_config.h usability... no
checking crm_config.h presence... no
checking for crm_config.h... no
checking glue_config.h usability... yes
checking glue_config.h presence... no
configure: WARNING: glue_config.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: glue_config.h: proceeding with the compiler's result
checking for glue_config.h... yes
checking for CRM_DAEMON_USER in crm_config.h... ./extract_define.CRM_DAEMON_USER.7436.c:2:24: fatal error: crm_config.h: No such file or directory
 #include <crm_config.h>
                        ^
compilation terminated.
./configure: line 2752: ./extract_define.CRM_DAEMON_USER.7436: No such file or directory

printf: usage: printf [-v var] format [arguments]
checking for CRM_DAEMON_GROUP in crm_config.h... ./extract_define.CRM_DAEMON_GROUP.7436.c:2:24: fatal error: crm_config.h: No such file or directory
 #include <crm_config.h>
                        ^
compilation terminated.
./configure: line 2752: ./extract_define.CRM_DAEMON_GROUP.7436: No such file or directory

printf: usage: printf [-v var] format [arguments]
checking for CRM_STATE_DIR in crm_config.h... ./extract_define.CRM_STATE_DIR.7436.c:2:24: fatal error: crm_config.h: No such file or directory
 #include <crm_config.h>
                        ^
compilation terminated.
./configure: line 2752: ./extract_define.CRM_STATE_DIR.7436: No such file or directory

printf: usage: printf [-v var] format [arguments]
checking for PE_STATE_DIR in crm_config.h... ./extract_define.PE_STATE_DIR.7436.c:2:24: fatal error: crm_config.h: No such file or directory
 #include <crm_config.h>
                        ^
compilation terminated.
./configure: line 2752: ./extract_define.PE_STATE_DIR.7436: No such file or directory

printf: usage: printf [-v var] format [arguments]
checking for CRM_CONFIG_DIR in crm_config.h... ./extract_define.CRM_CONFIG_DIR.7436.c:2:24: fatal error: crm_config.h: No such file or directory
 #include <crm_config.h>
                        ^
compilation terminated.
./configure: line 2752: ./extract_define.CRM_CONFIG_DIR.7436: No such file or directory

printf: usage: printf [-v var] format [arguments]
checking for CRM_DTD_DIRECTORY in crm_config.h... ./extract_define.CRM_DTD_DIRECTORY.7436.c:2:24: fatal error: crm_config.h: No such file or directory
 #include <crm_config.h>
                        ^
compilation terminated.
./configure: line 2752: ./extract_define.CRM_DTD_DIRECTORY.7436: No such file or directory
krig commented 9 years ago

I pushed a couple of fixes that should give better error messages at least. If nothing else you could perhaps try to rerun with these patches and give me the output, maybe that might help me figure out what's wrong here.

kirvedx commented 9 years ago

Should be fixed in Pull Request #94

:)

krig commented 9 years ago

Fixed by #94.