SAP Knowledge Base Article - Preview

2615046 - Usage of subprocess/popen2 not allowed in invoked python coding

Symptom

When configuring SAP HANA HA/DR provider (also known as 'Hooks') using "vip mover" you see one of these errors in the nameserver trace:

Error 1:

[14159]{-1}[-1/-1] 2018-01-02 17:37:34.068510 e ha_dr_provider PythonProxyImpl.cpp(00856) : vIPMover/vIPMover:startup() failed with python error: Usage of subprocess/popen2 not allowed in invoked python coding
vIPMover.py(20): self.shutdownIP()
vIPMover.py(69): rc = subprocess.call(command.split())
<string>(4):
[14153]{-1}[-1/-1] 2018-01-02 17:37:34.068650 f NameServer TREXNameServer.cpp(03913) : HA/DR Provider startup hook failed -> stopping instance ...
[14153]{-1}[-1/-1] 2018-01-02 17:37:34.068823 e Basis TREXNameServer.cpp(03945) : Process exited due to an error via explicit exit call with exit code 1 , no crash dump will be written
[14133]{-1}[-1/-1] 2018-01-02 17:37:34.068825 i Service_Shutdown TrexService.cpp(00629) : Preparing for shutting service down

.......

vIPMover.py scrpit has code block like this:

55.  def setupIP(self):
56.  # setup IP
57.  command1 = "sudo /sbin/ip addr add %s/%s dev %s" % (self.vIP, self.netMask, self.eth)
58.  rc1 = subprocess.call(command1.split())
59.  self.tracer.info("command '%s' returned with rc=%s" % (command1, rc1))
60.  command2 = "sudo /sbin/arping -U -c 5 %s" % self.vIP
61.  rc2 = subprocess.call(command2.split())
62.  self.tracer.info("command '%s' returned with rc=%s" % (command2, rc2))
63.  return rc1 + rc2

Affected releases: HANA 1.0 SPS12, HANA 2.0 SPS00, SPS01, SPS02

...............................................................................................

Error 2:

[338534]{-1}[-1/-1] 2018-04-18 14:31:41.335513 i ha_dr_vIPMover vIPMover.py(00098) : Enter Startup Hook
[338534]{-1}[-1/-1] 2018-04-18 14:31:41.335654 e ha_dr_provider PythonProxyImpl.cpp(00859) : vIPMover/vIPMover:startup() failed with python error: system() argument 1 must be string, not list
vIPMover.py(101): self.shutdownIP(storage_partition)
vIPMover.py(70): rc = os.system(command.split())
[336943]{-1}[-1/-1] 2018-04-18 14:31:41.335928 f NameServer TREXNameServer.cpp(03964) : HA/DR Provider startup hook failed -> stopping instance ...
[336943]{-1}[-1/-1] 2018-04-18 14:31:41.337032 e Basis TREXNameServer.cpp(03996) : Process exited due to an error via explicit exit call with exit code 1 , no crash dump will be written

vIPMover.py scrpit has code block like this:

80.  def shutdownIP(self, storage_partition):
81.  # Shutdown IP routine
82.  if storage_partition == 1:
83.  command = "sudo /sbin/ip addr del %s/%s dev %s" % (self.vIP1, self.netMask1, self.eth1)
84.  rc = os.system(command.split())
85.  self.tracer.info("command '%s' returned with rc=%s" % (command, rc))
86.  return rc

Affected releases: HANA 2.0 SPS03


Read more...

Environment

SAP HANA DB Version 2.0

Product

SAP HANA, platform edition 2.0

Keywords

HANA ; HA/DR ; hooks ; vIPMover ; vIPMover:startup() ; subprocess/popen2 ; command.split() ; python error ; , KBA , HAN-DB-HA , SAP HANA High Availability (System Replication, DR, etc.) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.