FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-02-2008, 08:00 PM
 
Default conga/luci/site/luci/Extensions FenceHandler.p ...

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe@sourceware.org 2008-01-02 21:00:32

Modified files:
luci/site/luci/Extensions: FenceHandler.py HelperFunctions.py
LuciClusterInfo.py LuciSyslog.py
LuciValidation.py LuciZope.py
LuciZopeAsync.py
LuciZopeClusterPortal.py
LuciZopeExternal.py LuciZopePerm.py
PropsObject.py ResourceHandler.py
Variable.py cluster_adapters.py
conga_constants.py conga_ssl.py
conga_storage_constants.py
homebase_adapters.py
ricci_communicator.py
ricci_defines.py system_adapters.py

Log message:
Update date ranges in copyright notices

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&r1=1.28&r2=1. 29
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/HelperFunctions.py.diff?cvsroot=cluster&r1=1.11&r2 =1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&r1=1.17&r2 =1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciSyslog.py.diff?cvsroot=cluster&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciValidation.py.diff?cvsroot=cluster&r1=1.1&r2=1 .2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZope.py.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeAsync.py.diff?cvsroot=cluster&r1=1.4&r2=1. 5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeClusterPortal.py.diff?cvsroot=cluster&r1=1 .2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeExternal.py.diff?cvsroot=cluster&r1=1.4&r2 =1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopePerm.py.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/PropsObject.py.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ResourceHandler.py.diff?cvsroot=cluster&r1=1.4&r2= 1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Variable.py.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.276& r2=1.277
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&r1=1.46&r2 =1.47
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_ssl.py.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_storage_constants.py.diff?cvsroot=cluster&r1 =1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.53& r2=1.54
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&r1=1.31 &r2=1.32
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_defines.py.diff?cvsroot=cluster&r1=1.3&r2=1. 4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/system_adapters.py.diff?cvsroot=cluster&r1=1.3&r2= 1.4

--- conga/luci/site/luci/Extensions/FenceHandler.py 2007/12/11 15:54:16 1.28
+++ conga/luci/site/luci/Extensions/FenceHandler.py 2008/01/02 21:00:31 1.29
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/HelperFunctions.py 2007/12/12 15:48:29 1.11
+++ conga/luci/site/luci/Extensions/HelperFunctions.py 2008/01/02 21:00:31 1.12
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciClusterInfo.py 2007/11/06 23:05:07 1.17
+++ conga/luci/site/luci/Extensions/LuciClusterInfo.py 2008/01/02 21:00:31 1.18
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciSyslog.py 2007/06/25 16:03:38 1.12
+++ conga/luci/site/luci/Extensions/LuciSyslog.py 2008/01/02 21:00:31 1.13
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciValidation.py 2007/12/12 15:43:15 1.1
+++ conga/luci/site/luci/Extensions/LuciValidation.py 2008/01/02 21:00:31 1.2
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Red Hat, Inc.
+# Copyright (C) 2007-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciZope.py 2007/12/12 15:48:29 1.6
+++ conga/luci/site/luci/Extensions/LuciZope.py 2008/01/02 21:00:31 1.7
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciZopeAsync.py 2007/12/12 15:48:30 1.4
+++ conga/luci/site/luci/Extensions/LuciZopeAsync.py 2008/01/02 21:00:31 1.5
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Red Hat, Inc.
+# Copyright (C) 2007-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciZopeClusterPortal.py 2007/06/25 16:03:38 1.2
+++ conga/luci/site/luci/Extensions/LuciZopeClusterPortal.py 2008/01/02 21:00:31 1.3
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciZopeExternal.py 2007/12/12 15:48:30 1.4
+++ conga/luci/site/luci/Extensions/LuciZopeExternal.py 2008/01/02 21:00:31 1.5
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Red Hat, Inc.
+# Copyright (C) 2007-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/LuciZopePerm.py 2007/06/25 16:03:38 1.2
+++ conga/luci/site/luci/Extensions/LuciZopePerm.py 2008/01/02 21:00:31 1.3
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/PropsObject.py 2007/09/24 21:19:42 1.8
+++ conga/luci/site/luci/Extensions/PropsObject.py 2008/01/02 21:00:31 1.9
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/ResourceHandler.py 2007/09/24 21:19:42 1.4
+++ conga/luci/site/luci/Extensions/ResourceHandler.py 2008/01/02 21:00:31 1.5
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/Variable.py 2007/09/24 21:19:42 1.6
+++ conga/luci/site/luci/Extensions/Variable.py 2008/01/02 21:00:31 1.7
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/12/12 15:45:27 1.276
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2008/01/02 21:00:32 1.277
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/conga_constants.py 2007/11/02 20:49:55 1.46
+++ conga/luci/site/luci/Extensions/conga_constants.py 2008/01/02 21:00:32 1.47
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/conga_ssl.py 2007/09/24 21:19:42 1.4
+++ conga/luci/site/luci/Extensions/conga_ssl.py 2008/01/02 21:00:32 1.5
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/conga_storage_constants.py 2007/10/09 20:20:02 1.11
+++ conga/luci/site/luci/Extensions/conga_storage_constants.py 2008/01/02 21:00:32 1.12
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/homebase_adapters.py 2007/08/08 21:00:07 1.53
+++ conga/luci/site/luci/Extensions/homebase_adapters.py 2008/01/02 21:00:32 1.54
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/ricci_communicator.py 2007/10/09 20:20:02 1.31
+++ conga/luci/site/luci/Extensions/ricci_communicator.py 2008/01/02 21:00:32 1.32
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/ricci_defines.py 2007/09/24 21:19:42 1.3
+++ conga/luci/site/luci/Extensions/ricci_defines.py 2008/01/02 21:00:32 1.4
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
--- conga/luci/site/luci/Extensions/system_adapters.py 2007/06/25 16:03:39 1.3
+++ conga/luci/site/luci/Extensions/system_adapters.py 2008/01/02 21:00:32 1.4
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2006-2008 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
 
Old 08-06-2010, 08:17 PM
 
Default conga/luci/site/luci/Extensions FenceHandler.p ...

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe@sourceware.org 2010-08-06 20:17:22

Modified files:
luci/site/luci/Extensions: FenceHandler.py RicciQueries.py
cluster_adapters.py

Log message:
Fix rhbz#612300 - conga will fail to start a new node that is added via luci

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag =RHEL5&r1=1.4.2.20&r2=1.4.2.21
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RicciQueries.py.diff?cvsroot=cluster&only_with_tag =RHEL5&r1=1.1.4.11&r2=1.1.4.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with _tag=RHEL5&r1=1.120.2.48&r2=1.120.2.49

--- conga/luci/site/luci/Extensions/FenceHandler.py 2010/08/05 19:06:35 1.4.2.20
+++ conga/luci/site/luci/Extensions/FenceHandler.py 2010/08/06 20:17:20 1.4.2.21
@@ -650,45 +650,34 @@
fencedev.removeAttribute('secure')

try:
- vmlogin = form['vmlogin'].strip()
- if not vmlogin:
+ vmware_type = form['vmware_type'].strip()
+ if not vmware_type in ('esx', 'server1', 'server2'):
+ vmware_type = None
raise Exception, 'blank'
- fencedev.addAttribute('vmlogin', vmlogin)
- except Exception, e:
- errors.append(FD_PROVIDE_VMLOGIN)
-
- has_vmpasswd = False
- try:
- vmpwd = form['vmpasswd'].strip()
- if not vmpwd:
- # Allow passwords that consist of only spaces.
- if not form.has_key('vmpasswd') or form['vmpasswd'] == ':
- raise Exception, 'blank'
- else:
- vmpwd = form['vmpasswd']
- fencedev.addAttribute('vmpasswd', vmpwd)
- has_vmpasswd = True
+ fencedev.addAttribute('vmware_type', vmware_type)
except Exception, e:
try:
- fencedev.removeAttribute('vmpasswd')
+ fencedev.removeAttribute('vmware_type')
except:
pass

- try:
- vmpwd_script = form['vmpasswd_script'].strip()
- if not vmpwd_script:
- raise Exception, 'blank'
- fencedev.addAttribute('vmpasswd_script', vmpwd_script)
- has_vmpasswd = True
- except Exception, e:
+ if not vmware_type in ('server1', 'server2'):
try:
- fencedev.removeAttribute('vmpasswd_script')
+ vmware_dc = form['vmware_datacenter'].strip()
+ if not vmware_dc:
+ raise Exception, 'blank'
+ fencedev.addAttribute('vmware_datacenter', vmware_dc)
+ except Exception, e:
+ try:
+ fencedev.removeAttribute('vmware_datacenter')
+ except:
+ pass
+ else:
+ try:
+ fencedev.removeAttribute('vmware_datacenter')
except:
pass

- if not has_vmpasswd:
- errors.append(FD_PROVIDE_VMPASSWD)
-
return errors

def val_noop_fd(dummy, _dummy):
--- conga/luci/site/luci/Extensions/RicciQueries.py 2008/09/17 06:29:54 1.1.4.11
+++ conga/luci/site/luci/Extensions/RicciQueries.py 2010/08/06 20:17:20 1.1.4.12
@@ -13,6 +13,7 @@
luci_log = get_logger()

def addClusterNodeBatch(cluster_name,
+ conf_str,
install_base,
install_services,
install_shared_storage,
@@ -22,6 +23,11 @@
reboot_nodes=False):
batch = list()

+ conf = str(conf_str).replace('<?xml version="1.0"?>', ')
+ conf = conf.replace('<?xml version="1.0" ?>', ')
+ conf = conf.replace('<? xml version="1.0"?>', ')
+ conf = conf.replace('<? xml version="1.0" ?>', ')
+
batch.append('<module name="rpm">')
batch.append('<request API_version="1.0">')
batch.append('<function_call name="install">')
@@ -84,15 +90,7 @@
batch.append('<request API_version="1.0">')
batch.append('<function_call name="set_cluster.conf">')
batch.append('<var mutable="false" name="propagate" type="boolean" value="false"/>')
- batch.append('<var mutable="false" name="cluster.conf" type="xml">')
- batch.append('<cluster config_version="1" name="%s">' % cluster_name)
- batch.append('<fence_daemon post_fail_delay="0" post_join_delay="3"/>')
- batch.append('<clusternodes/>')
- batch.append('<cman/>')
- batch.append('<fencedevices/>')
- batch.append('<rm/>')
- batch.append('</cluster>')
- batch.append('</var>')
+ batch.append('<var mutable="false" name="cluster.conf" type="xml">%s</var>' % conf)
batch.append('</function_call>')
batch.append('</request>')
batch.append('</module>')
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2009/01/26 17:01:22 1.120.2.48
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2010/08/06 20:17:21 1.120.2.49
@@ -545,7 +545,26 @@
try:
skeys = system_list.keys()
skeys.sort()
+
+ for x in skeys:
+ i = system_list[x]
+ next_node_id += 1
+ new_node = ClusterNode()
+ new_node.attr_hash['name'] = str(i['host'])
+ new_node.attr_hash['votes'] = str(1)
+ while next_node_id in used_ids:
+ next_node_id += 1
+ new_node.attr_hash['nodeid'] = str(next_node_id)
+ nodesptr.addChild(new_node)
+
+ model.setModified(True)
+ conf_str = str(model.exportModelAsString())
+ if not conf_str:
+ raise Exception, 'Unable to save the new cluster model'
+
+ # Propagate the new cluster.conf to the existing nodes
batch_node = rq.addClusterNodeBatch(clustername,
+ conf_str,
True,
True,
shared_storage,
@@ -559,27 +578,12 @@
raise Exception, 'batch is blank'

for x in skeys:
- i = system_list[x]
system_list[x]['batch'] = batch_node_xml
- next_node_id += 1
- new_node = ClusterNode()
- new_node.attr_hash['name'] = str(i['host'])
- new_node.attr_hash['votes'] = str(1)
- while next_node_id in used_ids:
- next_node_id += 1
- new_node.attr_hash['nodeid'] = str(next_node_id)
- nodesptr.addChild(new_node)

if incomplete or len(errors) > 0:
request.SESSION.set('add_node', add_cluster)
return (False, { 'errors': errors, 'messages': messages })

- model.setModified(True)
- conf_str = str(model.exportModelAsString())
- if not conf_str:
- raise Exception, 'Unable to save the new cluster model'
-
- # Propagate the new cluster.conf to the existing nodes
# before having any of the new nodes join. If this fails,
# abort the whole process.
result = rq.setClusterConfSync(cluster_ricci, conf_str)
 

Thread Tools




All times are GMT. The time now is 05:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org