<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:tax="http://schemas.microsoft.com/sharepoint/taxonomy/soap/" xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/" xmlns:spsup="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I think the likely reason you got the OrphanedObjectError exception is because you were trying to save new app state to the database without a context. Other observations:<br>
- Checking if kubernetes is enabled is unnecessary. Kubernetes is always enabled in StarlingX.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> - By default, enabled logging levels are INFO and higher<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> - Currently only helm chart based apps can be managed via system application commands.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> - The rpc_app name is not suitable as the app object did not come from RPC call.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Tee<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Chen, Haochuan Z [mailto:haochuan.z.chen@intel.com]
<br>
<b>Sent:</b> June-05-19 9:29 AM<br>
<b>To:</b> Ngo, Tee; Bailey, Henry Albert (Al); starlingx-discuss@lists.starlingx.io<br>
<b>Subject:</b> fix solution proposal for LP1826047<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D">Hi Ngo & Bailey</span></a><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Today I add these lines in stx-config/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py, function __init__<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> system = dbapi.isystem_get_one()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if system.capabilities.get('kubernetes_enabled', False):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> LOG.error("kubernetes_enabled")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> for rpc_app in dbapi.kube_app_get_all():<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> app = AppOperator.Application(rpc_app,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> rpc_app.get('name') in self._helm.get_helm_applications())<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> op = ""<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if app.status == constants.APP_APPLY_IN_PROGRESS:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> op = constants.APP_APPLY_OP<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> elif app.status == constants.APP_UPLOAD_IN_PROGRESS:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> op = constants.APP_UPLOAD_OP<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> elif app.status == constants.APP_REMOVE_IN_PROGRESS:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> op = constants.APP_REMOVE_OP<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> if op:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> self._abort_operation(app, op)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> LOG.info("reset %s to %s failed" % (app.name, op))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">But it will fail with<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:11.549 1987918 WARNING ceph_client [-] skip checking server certificate<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.055 1987918 ERROR sysinv.conductor.kube_app [-] kubernetes_enabled<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 ERROR sysinv.openstack.common.threadgroup [-] Cannot call save on orphaned KubeApp object<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/threadgroup.py", line 117, in wait<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup x.wait()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/threadgroup.py", line 49, in wait<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup return self.thread.wait()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup return self._exit_event.wait()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup return hubs.get_hub().switch()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup return self.greenlet.switch()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup result = function(*args, **kwargs)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/service.py", line 450, in run_service<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup service.start()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 179, in start<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup self._start()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 205, in _start<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup self._app = kube_app.AppOperator(self.dbapi)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/kube_app.py", line 157, in __init__<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup self._abort_operation(app, op)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/kube_app.py", line 198, in _abort_operation<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup progress)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/kube_app.py", line 189, in _update_app_status<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup app.update_status(new_status, new_progress)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/kube_app.py", line 1415, in update_status<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup self._kube_app.save()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/objects/base.py", line 128, in wrapper<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup objtype=self.obj_name())<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2019-06-05 07:54:12.062 1987918 TRACE sysinv.openstack.common.threadgroup
</span><span style="color:red">OrphanedObjectError: Cannot call save on orphaned KubeApp object</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Any idea about it, or whether this solution is feasible or not.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Now I work on perform_apply_abort, tomorrow I will update to you.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">And for sysinv-api exit, it should doesn’t matter. As sysinv-conductor takes the task to make application apply and status update in database, sysinv-api just polling database with application-list<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">BR!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#1F497D">Martin, Chen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">SSP, Software Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">021-61164330<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Ngo, Tee [mailto:Tee.Ngo@windriver.com] <br>
<b>Sent:</b> Tuesday, June 4, 2019 9:27 PM<br>
<b>To:</b> Bailey, Henry Albert (Al) <Al.Bailey@windriver.com>; Chen, Haochuan Z <haochuan.z.chen@intel.com>; starlingx-discuss@lists.starlingx.io<br>
<b>Subject:</b> RE: fix solution proposal for LP1826047<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">It should be a combination of 2 solutions as solution #2 provides the option to bail while sysinv processes are running<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="color:#1F497D">a)</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1F497D">
</span><span style="color:#1F497D">application thread stalled (e.g. during the cleanup of (test) mariadb pods/stx-openstack namespace issue seen in the past and the system became sluggish)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="color:#1F497D">b)</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1F497D">
</span><span style="color:#1F497D">client simply wants to abort the operation<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Solution #2 is more involved than just updating the app state in the database.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Tee<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Bailey, Henry Albert (Al) [<a href="mailto:Al.Bailey@windriver.com">mailto:Al.Bailey@windriver.com</a>]
<br>
<b>Sent:</b> June-04-19 8:52 AM<br>
<b>To:</b> Chen, Haochuan Z; <a href="mailto:starlingx-discuss@lists.starlingx.io">
starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> Re: [Starlingx-discuss] fix solution proposal for LP1826047<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Solution 1 sounds like how Openstack Heat handles an abnormal termination of the heat-engine (how it needs to properly clean up its stack locks)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Solution 2 is similar to what I have seen for nova and cinder CLI options.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Personally, I like option 1.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Al<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Chen, Haochuan Z [<a href="mailto:haochuan.z.chen@intel.com">mailto:haochuan.z.chen@intel.com</a>]
<br>
<b>Sent:</b> Tuesday, June 04, 2019 1:28 AM<br>
<b>To:</b> <a href="mailto:starlingx-discuss@lists.starlingx.io">starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> [Starlingx-discuss] fix solution proposal for LP1826047<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am check this launch pad issue. This issue is failed, when system application apply(retrieving docker image), sysinv-api exit unexpected. When service manager re-launch sysinv-api again, application status is in applying status.<o:p></o:p></p>
<p class="MsoNormal">So application could not be removed. There are two solutions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Solution 1, when sysinv-api or sysinv-conductor launch, in __init__ function, check application status in database, if status is “uploading”, ”applying” or “removing”, change the status to “upload-failed”, “apply-failed” or “removed-failed”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Solution 2, add perform-abort action for upload or apply. Use a flag to quickly exit and upload and apply action, and set database to “upload-failed” or “apply-failed”.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="https://bugs.launchpad.net/starlingx/+bug/1826047">https://bugs.launchpad.net/starlingx/+bug/1826047</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Wait for brain-storming.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Martin, Chen<o:p></o:p></p>
<p class="MsoNormal">SSP, Software Engineer<o:p></o:p></p>
<p class="MsoNormal">021-61164330<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>