Commit 44570998 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

system_upgrader and product_upgrader are abandoned, they should be handled by...

system_upgrader and product_upgrader are abandoned, they should be handled by instance creation in buildout.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43066 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 60b82f8f
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>alarm_notification_mode</string> </key>
<value>
<tuple>
<string>always</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This Alarm check that products are the right ones. If not, it upgrades the products using SVN (for dedicate instances) or using PRODUCT HOME for Free / Express instances.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>product_upgrader</string> </value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1136073600.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>sense_method_id</string> </key>
<value> <string>Alarm_senseProductVersion</string> </value>
</item>
<item>
<key> <string>solve_method_id</string> </key>
<value> <string>Alarm_upgradeProductVersion</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Product Upgrader</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>alarm_notification_mode</string> </key>
<value>
<tuple>
<string>always</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Makes sure that we using the appropriate version of the system (ie.Python, Zope, libraries, etc.). System in this case refer to a Plataform (zope, python, local libraries...). This alarms can detect system upgrade required and upgrade it.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>system_upgrader</string> </value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1136073600.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>sense_method_id</string> </key>
<value> <string>Alarm_senseSystemVersion</string> </value>
</item>
<item>
<key> <string>solve_method_id</string> </key>
<value> <string>Alarm_upgradeSystemVersion</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>System Upgrader</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
Here we make sure the installed products are the right ones\n
"""\n
alarm_dict = context.ERP5Site_getUpgraderSignature.get(\'alarm_dict\', {})\n
if not alarm_dict.get(context.getId(), True):\n
return False\n
\n
# check if upgrade is needed\n
return len(context.ERP5Site_upgradeProductPath()) > 0\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_senseProductVersion</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
Here we make sure the all required system libraries are installed in\n
appropriate version.\n
"""\n
alarm_dict = context.ERP5Site_getUpgraderSignature.get(\'alarm_dict\', {})\n
if not alarm_dict.get(context.getId(), True):\n
return False\n
\n
# Verify if upgrade is required for Python\n
if len(context.ERP5Site_upgradePythonExecutable()) > 0:\n
return True\n
\n
# Verify if uprgade is required for Zope\n
if len(context.ERP5Site_upgradeSoftwareHome()) > 0:\n
return True\n
\n
return False\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_senseSystemVersion</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -56,8 +56,6 @@
This script is used in an alarm that acts as a cron job.\n
It will start an instance upgrade if any of the following alarms:\n
- bt5_upgrader (supported)\n
- product_upgrader (supported)\n
- system_upgrader (supported)\n
\n
"sense" a need of an upgrade. This alarm is likely to disappear soon as it\'s needed \n
due to lack of functionality (which is that alarms can not automatically "solve" themselves).\n
......@@ -110,14 +108,6 @@ def launchUpgraderAlarm(alarm_id, after_method_id=[]):\n
# There is one strict order to run the alarms\n
# This is required because the one alarms depends the previous one be\n
# Fully done.\n
previous_method_id = launchUpgraderAlarm(\'system_upgrader\')\n
previous_method_id = launchUpgraderAlarm(\'product_upgrader\', \n
after_method_id = previous_method_id)\n
\n
\n
previous_method_id.extend(["ERP5Site_restartZopeInstance",\n
"ERP5Site_clearActivities"])\n
\n
previous_method_id = launchUpgraderAlarm(\'bt5_upgrader\', \n
after_method_id = previous_method_id)\n
\n
......@@ -128,8 +118,7 @@ previous_method_id.extend([\'updateBusinessTemplateFromUrl\',\n
previous_method_id = launchUpgraderAlarm(\'finalize_upgrader\',\n
after_method_id = previous_method_id)\n
\n
for alarm_id in [\'system_upgrader\', \'product_upgrader\', \n
\'bt5_upgrader\' , \'finalize_upgrader\']:\n
for alarm_id in [\'bt5_upgrader\' , \'finalize_upgrader\']:\n
\n
upgrader_alarm = getattr(portal_alarms, alarm_id, None)\n
if upgrader_alarm is not None and upgrader_alarm.sense():\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
Upgrade product path to the release version of this upgrader\n
"""\n
\n
portal_alarms = context.getPortalObject().portal_alarms\n
activate = context.portal_activities.activate\n
\n
# Group Messages into the same active process.\n
active_process = portal_alarms.upgrader_controller.getLastActiveProcess()\n
if active_process is None:\n
active_process = context.newActiveProcess()\n
\n
active_process = active_process.getPath()\n
\n
message_list = []\n
message_list.extend(context.ERP5Site_upgradeProductPath(upgrade=1))\n
\n
activate(active_process=active_process,\n
activity=\'SQLQueue\',\n
priority=2).Alarm_saveActiveResult(\n
summary="Upgrade Products Version",\n
severity=0,\n
detail=\'\\n\'.join(message_list))\n
\n
# Only restart if products were upgraded. Otherwise ignore restart.\n
if len(message_list) > 0:\n
# We don\'t want to restart the server during the tests or some cases\n
# we can post done the restart.\n
activate(activite_process=active_process,\n
activity=\'SQLQueue\',\n
priority=5).ERP5Site_restartZopeInstance()\n
\n
activate(activity=\'SQLQueue\',\n
tag=\'update_product_tag\', \n
after_method_id=\'ERP5Site_restartZopeInstance\' \n
).ERP5Site_verifyProductPathUpgrade()\n
\n
activate(activity=\'SQLQueue\',\n
after_tag = \'update_product_tag\', \n
priority=0).ERP5Site_clearActivities()\n
\n
return message_list\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_upgradeProductVersion</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
We do not upgrade the system from the upgrader.\n
"""\n
\n
portal_alarms = context.getPortalObject().portal_alarms\n
activate = context.portal_activities.activate\n
# Group Messages into the same active process.\n
active_process = portal_alarms.upgrader_controller.getLastActiveProcess()\n
if active_process is None:\n
active_process = context.newActiveProcess().getPath()\n
\n
active_process = active_process.getPath()\n
\n
message_list = []\n
# Upgrade Software Home\n
message_list.extend(context.ERP5Site_upgradeSoftwareHome(upgrade=1))\n
\n
# Upgrade Python Executable\n
message_list.extend(context.ERP5Site_upgradePythonExecutable(upgrade=1))\n
\n
activate(active_process=active_process,\n
activity=\'SQLQueue\',\n
priority=2).Alarm_saveActiveResult(\n
summary="Upgrade System Version",\n
severity=0,\n
detail=\'\\n---\\n\'.join(message_list))\n
\n
return message_list\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_upgradeSystemVersion</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
565
\ No newline at end of file
566
\ No newline at end of file
portal_alarms/bt5_upgrader
portal_alarms/finalize_upgrader
portal_alarms/product_upgrader
portal_alarms/system_upgrader
portal_alarms/upgrader_controller
portal_workflow/business_template_installation_workflow/scripts/BusinessTemplate_install
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment