SUSE / ha-sap-terraform-deployments

Automated SAP/HA Deployments in Public/Private Clouds
GNU General Public License v3.0
122 stars 88 forks source link

issues with salt-3006 #908

Closed yeoldegrove closed 1 year ago

yeoldegrove commented 1 year ago

Used cloud platform Azure

Used SLES4SAP version SLES15SP4

Expected behaviour vs observed behaviour When running with salt-3006.0-150400.8.34.2.x86_64, the hana state functions from salt-shaptools are no longer found. This is also true for every other state function from salt-shaptools.

e.g.

module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec): ----------
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):           ID: hana_install_vmhana01prd
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):     Function: hana.installed
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):         Name: prd
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):       Result: False
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):      Comment: State 'hana.installed' was not found in SLS 'hana.install'
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):               Reason: 'hana.installed' is not available.
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec):      Changes:
module.hana_node.module.hana_provision.null_resource.provision[0] (remote-exec): ----------

The functions are not found by this call:

vmhana01:~ # salt-call --local sys.list_state_functions|grep hana
/usr/lib/python3.6/site-packages/salt/states/x509.py:214: DeprecationWarning: The x509 modules are deprecated. Please migrate to the replacement modules (x509_v2). They are the default from Salt 3008 (Argon) onwards.
  "The x509 modules are deprecated. Please migrate to the replacement "

When running with salt-3004-150400.8.25.1.x86_64, everything works as expected.

vmhana01:~ # rpm -q salt
salt-3004-150400.8.25.1.x86_64
vmhana01:~ # salt-call --local sys.list_state_functions|grep hana
    - hana.available
    - hana.installed
    - hana.memory_resources_updated
    - hana.pydbapi_extracted
    - hana.sr_clean
    - hana.sr_primary_enabled
    - hana.sr_secondary_registered
    - hana.uninstalled

The new salt-3006 is in the official repos of e.g. SLES15SP4/SP5.

We have investigate to find a solution for this.

arbulu89 commented 1 year ago

@yeoldegrove I had this issue myself, and was to lazy to open a ticket :sweat_smile: Thank you

yeoldegrove commented 1 year ago

When running salt-call --local sys.list_state_functions -l debug the following related error message is shown:

  File "/var/cache/salt/minion/extmods/states/hanamod.py", line 64, in <module>
    from salt.ext import six
ImportError: cannot import name 'six'
[DEBUG   ] Failed to import states netweavermod:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 772, in _load_module
    mod = self.run(spec.loader.load_module)
  File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1234, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
    return callable(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1249, in _run_as
    return _func_or_method(*args, **kwargs)
arbulu89 commented 1 year ago

Yes, it is related to six, as this package now is not imported as external

yeoldegrove commented 1 year ago

salt-shaptools-0.3.18 was released in https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:devel/ and https://download.opensuse.org/repositories/network:/ha-clustering:/sap-deployments:/v9/. Using these repos via variable ha_sap_deployment_repo fixes the issue.