oravirt / ansible-oracle

Oracle related stuff. Installs RAC/RAC One Node/Single Instance
MIT License
346 stars 249 forks source link

Role orasw_download_patches - download of OneOff-patches #477

Open aliensmily opened 1 month ago

aliensmily commented 1 month ago

Hi!

Seems to be, the patch download doens't work for OneOff-patches.

Example patches:

    oracle_sw_patches:
      - filename: p36582781_190000_Linux-x86-64.zip
        patchid: 36582781
        version: 19
        patchversion: 19.24.0.0.0.240716
        description: DB-RU-July-2024
      - patchid: 34774667
        filename: p34774667_1924000DBRU_Linux-x86-64.zip
        version: 19
        patchversion: 19.24.0.0.0
        description: OneOff34774667

Output:

ok: [localhost] => (item=p34774667_1924000DBRU_Linux-x86-64.zip ARU=25677714 ) => { "ansible_loop_var": "item", "changed": false, "connection": "close, Transfer-Encoding", ERROR Task exception was never retrieved future: <Task finished name='Task-4' coro=<_read_stream() done, defined at /opt/company/venvs/ansible-9.4-py3/lib/python3.10/site-packages/subprocess_tee/init.py:28> exception=ValueError('Separator is not found, and chunk exceed the limit')> Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/streams.py", line 524, in readline line = await self.readuntil(sep) File "/usr/lib/python3.10/asyncio/streams.py", line 602, in readuntil raise exceptions.LimitOverrunError( asyncio.exceptions.LimitOverrunError: Separator is not found, and chunk exceed the limit

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/company/venvs/ansible-9.4-py3/lib/python3.10/site-packages/subprocess_tee/init.py", line 30, in _read_stream line = await stream.readline() File "/usr/lib/python3.10/asyncio/streams.py", line 533, in readline raise ValueError(e.args[0]) ValueError: Separator is not found, and chunk exceed the limit ERROR Task exception was never retrieved future: <Task finished name='Task-3' coro=<_read_stream() done, defined at /opt/company/venvs/ansible-9.4-py3/lib/python3.10/site-packages/subprocess_tee/init.py:28> exception=ValueError('Separator is not found, and chunk exceed the limit')> Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/streams.py", line 524, in readline line = await self.readuntil(sep) File "/usr/lib/python3.10/asyncio/streams.py", line 602, in readuntil raise exceptions.LimitOverrunError( asyncio.exceptions.LimitOverrunError: Separator is not found, and chunk exceed the limit

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/company/venvs/ansible-9.4-py3/lib/python3.10/site-packages/subprocess_tee/init.py", line 30, in _read_stream line = await stream.readline() File "/usr/lib/python3.10/asyncio/streams.py", line 533, in readline raise ValueError(e.args[0]) ValueError: Separator is not found, and chunk exceed the limit CRITICAL Ansible return code was 2, command was: ansible-playbook --extra-vars '{'"'"'awx_mos_password'"'"': '"'"'secret'"'"', '"'"'awx_mos_login'"'"': '"'"'user@company.de'"'"' } ' --inventory /home/domain/osuser/.cache/molecule/patch_download/default/inventory --skip-tags molecule-notest,notest /home/domain/osuser/gitrepos/oracle_col/roles/patch_download/molecule/default/converge.yml

Oracle seems to use another site for OneOff-patches then for patches applying to base-release.

Rendanic commented 1 month ago

Hi, I made some tests with molecule:

extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml

oracle_databases: []
oracle_pdbs: []

oracle_sw_patches:
  - filename: p36582781_190000_Linux-x86-64.zip
    patchid: 36582781
    version: 19
    patchversion: 19.24.0.0.0.240716
    description: DB-RU-July-2024
  - patchid: 34774667
    filename: p34774667_1924000DBRU_Linux-x86-64.zip
    version: 19
    patchversion: 19.24.0.0.0
    description: OneOff34774667
  # - filename: cvupack_linux_ol7_x86_64.zip
  #   patchid: 30839369
  #   version: 21.0.0.0
  #   description: Latest cluvfy
  # - filename: p36695709_2410_Generic.zip
  #   patchid: 36695709
  #   version: 24.1
  #   description: PSE BUNDLE FOR APEX 24.1
  #   opatch_needed: false
  # - filename: p36582781_190000_Linux-x86-64.zip
  #   patchid: 36582781
  #   version: 19.3.0.0
  #   description: Database Release Update 19.24.0.0.240716

git diff extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml

git a/extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml b/extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml
index d0efbf81..22ac692c 100644
--- a/extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml
+++ b/extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml
@@ -21,20 +21,33 @@ golden_image_dest: /u01/golden

 apply_patches_db: true

+oracle_databases: []
+oracle_pdbs: []
+
 oracle_sw_patches:
-  - filename: cvupack_linux_ol7_x86_64.zip
-    patchid: 30839369
-    version: 21.0.0.0
-    description: Latest cluvfy
-  - filename: p36695709_2410_Generic.zip
-    patchid: 36695709
-    version: 24.1
-    description: PSE BUNDLE FOR APEX 24.1
-    opatch_needed: false
   - filename: p36582781_190000_Linux-x86-64.zip
     patchid: 36582781
-    version: 19.3.0.0
-    description: Database Release Update 19.24.0.0.240716
+    version: 19
+    patchversion: 19.24.0.0.0.240716
+    description: DB-RU-July-2024
+  - patchid: 34774667
+    filename: p34774667_1924000DBRU_Linux-x86-64.zip
+    version: 19
+    patchversion: 19.24.0.0.0
+    description: OneOff34774667
+  # - filename: cvupack_linux_ol7_x86_64.zip
+  #   patchid: 30839369
+  #   version: 21.0.0.0
+  #   description: Latest cluvfy
+  # - filename: p36695709_2410_Generic.zip
+  #   patchid: 36695709
+  #   version: 24.1
+  #   description: PSE BUNDLE FOR APEX 24.1
+  #   opatch_needed: false
+  # - filename: p36582781_190000_Linux-x86-64.zip
+  #   patchid: 36582781
+  #   version: 19.3.0.0
+  #   description: Database Release Update 19.24.0.0.240716

 # Important!

Test with molecule:

cd extensions/
molecule converge -s download

I added oracle_databases and oracle_pdbs in inventory, due to a bug in the role which I introduced with the download option for APEX...

The download works as expected.

I feels like that the issue is related to your environment. The role writes the downloads to {{ oracle_patch_download_host | default('localhost) }} with delegate_to.

Are you using AWX/Ansible Tower?

Regards Thorsten

aliensmily commented 1 month ago

Hi Thorsten,

may it is caused somewhere in our python3 venv. I tried to download the content into a file und load the content via slurp module... got the same error exceptions.

I ended up developing a role of my own (download html content -> get suitable URLs via sed -> download files).

Many thanks for your support and your work on this project.

Regards, David

Rendanic commented 1 month ago

Hi, I think it's an issue in the settings or combination of Python and Ansible on your site. You'll possibly hit the problem in other playbooks too, because the download role is using popular ansible modules.

What exact version of Python and ansible-core are you using?

Kind Regards Thorsten

aliensmily commented 1 month ago

Hi Thorsten,

here our python/ansible venv:

Python 3.10.12

# pip list
Package                              Version
------------------------------------ ----------------
adal                                 1.2.2
aiohttp                              3.9.5
aiosignal                            1.3.1
ansible                              9.4.0
ansible-base                         2.10.8
ansible-compat                       24.9.0
ansible-core                         2.16.6
ansible-doctor                       2.0.5
ansible-lint                         24.9.0
ansible_rulebook                     1.1.0
ansible-runner                       2.4.0
ansible-tower-cli                    3.3.8
anyconfig                            0.13.0
anyio                                4.3.0
apache-libcloud                      3.2.0
appdirs                              1.4.4
applicationinsights                  0.11.10
argcomplete                          1.8.1
async-timeout                        4.0.3
attrs                                23.2.0
awscli                               1.34.17
awxkit                               21.13.0
azure-cli-core                       2.34.0
azure-cli-telemetry                  1.0.6
azure-common                         1.1.11
azure-containerregistry              1.1.0
azure-core                           1.28.0
azure-identity                       1.14.0
azure-iot-hub                        2.6.1
azure-keyvault                       4.2.0
azure-keyvault-certificates          4.7.0
azure-keyvault-keys                  4.8.0
azure-keyvault-secrets               4.7.0
azure-mgmt-apimanagement             3.0.0
azure-mgmt-authorization             2.0.0
azure-mgmt-automation                1.0.0
azure-mgmt-batch                     16.2.0
azure-mgmt-cdn                       11.0.0
azure-mgmt-compute                   26.1.0
azure-mgmt-containerinstance         9.0.0
azure-mgmt-containerregistry         9.1.0
azure-mgmt-containerservice          20.0.0
azure-mgmt-core                      1.3.0
azure-mgmt-cosmosdb                  6.4.0
azure-mgmt-datafactory               2.0.0
azure-mgmt-datalake-store            1.0.0
azure-mgmt-devtestlabs               9.0.0
azure-mgmt-dns                       8.0.0
azure-mgmt-eventhub                  10.1.0
azure-mgmt-hdinsight                 9.0.0
azure-mgmt-iothub                    2.2.0
azure-mgmt-keyvault                  10.0.0
azure-mgmt-loganalytics              12.0.0
azure-mgmt-managedservices           6.0.0
azure-mgmt-managementgroups          1.0.0
azure-mgmt-marketplaceordering       1.1.0
azure-mgmt-monitor                   3.0.0
azure-mgmt-network                   19.1.0
azure-mgmt-notificationhubs          7.0.0
azure-mgmt-nspkg                     2.0.0
azure-mgmt-privatedns                1.0.0
azure-mgmt-rdbms                     10.0.0
azure-mgmt-recoveryservices          2.0.0
azure-mgmt-recoveryservicesbackup    3.0.0
azure-mgmt-redis                     13.0.0
azure-mgmt-resource                  21.1.0
azure-mgmt-search                    8.0.0
azure-mgmt-servicebus                7.1.0
azure-mgmt-sql                       3.0.1
azure-mgmt-storage                   19.0.0
azure-mgmt-trafficmanager            1.0.0b1
azure-mgmt-web                       6.1.0
azure-nspkg                          2.0.0
azure-storage-blob                   12.11.0
Babel                                2.8.0
bcrypt                               3.2.0
beautifulsoup4                       4.10.0
beniget                              0.4.1
black                                24.8.0
blinker                              1.4
boto3                                1.20.34
botocore                             1.35.17
bracex                               2.2.1
Brotli                               1.0.9
cachetools                           5.0.0
certifi                              2020.6.20
cffi                                 1.15.0
cfgv                                 3.4.0
chardet                              4.0.0
charset-normalizer                   3.3.2
click                                8.0.3
click-help-colors                    0.9.4
colorama                             0.4.6
command-not-found                    0.3
commonmark                           0.9.1
cryptography                         3.4.8
cvpysdk                              11.36
cx_Oracle                            7.2.3
cycler                               0.11.0
dbus-python                          1.2.18
debtcollector                        2.3.0
decorator                            4.4.2
Deprecated                           1.2.14
distlib                              0.3.4
distro                               1.7.0
distro-info                          1.1+ubuntu0.2
dnspython                            2.6.1
docker                               7.0.0
docutils                             0.16
dpath                                2.1.6
drools_jpy                           0.3.9
enrich                               1.2.7
environs                             9.5.0
exceptiongroup                       1.2.1
filelock                             3.6.0
fonttools                            4.29.1
frozenlist                           1.4.1
fs                                   2.4.12
future                               0.18.2
gast                                 0.5.2
gitdb                                4.0.11
GitPython                            3.1.43
google-auth                          1.5.1
gpg                                  1.16.0
grpcio                               1.62.2
grpcio-tools                         1.62.2
gssapi                               1.6.12
h11                                  0.14.0
h2                                   4.1.0
hpack                                4.0.0
hpeOneView                           6.1.0
html5lib                             1.1
httpcore                             1.0.5
httplib2                             0.20.2
httpx                                0.27.0
humanfriendly                        10.0
hvac                                 2.3.0
hyperframe                           6.0.1
identify                             2.5.35
idna                                 3.3
importlib-metadata                   7.0.0
infoblox-client                      0.6.0
iniconfig                            2.0.0
iotop                                0.6
ipaddress                            1.0.23
iso8601                              1.0.2
isodate                              0.6.1
janus                                1.0.0
jeepney                              0.7.1
Jinja2                               3.1.4
jmespath                             1.0.1
jpy                                  0.16.0
jsonschema                           4.21.1
jsonschema-specifications            2023.12.1
kafka                                1.3.5
kafka-python                         2.0.2
keyring                              23.5.0
kiwisolver                           1.3.2
knack                                0.9.0
kubernetes                           30.1.0
language-selector                    0.1
launchpadlib                         1.10.16
lazr.restfulclient                   0.14.4
lazr.uri                             1.0.6
lockfile                             0.12.2
lxml                                 4.8.0
lz4                                  3.1.3+dfsg
markdown-it-py                       3.0.0
MarkupSafe                           2.0.1
marshmallow                          3.19.0
matplotlib                           3.5.1
mdurl                                0.1.2
microsoft-kiota-abstractions         1.3.2
microsoft-kiota-authentication-azure 1.0.0
microsoft-kiota-http                 1.3.1
microsoft-kiota-serialization-json   1.2.0
microsoft-kiota-serialization-text   1.0.0
molecule                             6.0.3
molecule-plugins                     23.5.3
monotonic                            1.6
more-itertools                       8.10.0
mpmath                               0.0.0
msal                                 1.28.0
msal-extensions                      0.3.1
msgpack                              1.0.3
msgraph-core                         1.0.0
msgraph-sdk                          1.0.0
msrest                               0.7.1
msrestazure                          0.6.4.post1
multidict                            6.0.5
mypy-extensions                      0.4.3
mysql                                0.0.3
mysqlclient                          1.4.6
nested-lookup                        0.2.25
netaddr                              0.8.0
netapp-lib                           2021.6.25
netifaces                            0.11.0
nodeenv                              1.8.0
nsx-policy-python-sdk                4.1.2.0.0
nsx-python-sdk                       4.1.2.0.0
nsx-vmc-aws-integration-python-sdk   4.1.2.0.0
nsx-vmc-policy-python-sdk            4.1.2.0.0
ntlm-auth                            1.4.0
numpy                                1.21.5
oauthlib                             3.2.2
olefile                              0.46
omsdk                                1.2.518
openshift                            0.13.2
opentelemetry-api                    1.24.0
opentelemetry-sdk                    1.24.0
opentelemetry-semantic-conventions   0.45b0
oslo.config                          8.8.0
oslo.context                         4.1.0
oslo.i18n                            5.1.0
oslo.log                             4.6.1
oslo.serialization                   4.2.0
oslo.utils                           4.12.2
ovirt-engine-sdk-python              4.4.15
packaging                            24.1
paramiko                             2.9.3
pathspec                             0.12.1
pbr                                  5.8.0
pendulum                             3.0.0
pexpect                              4.9.0
Pillow                               9.0.1
pip                                  24.2
pkginfo                              1.10.0
platformdirs                         2.5.1
pluggy                               1.5.0
ply                                  3.11
portalocker                          1.7.1
pre-commit                           2.17.0
protobuf                             4.25.3
psutil                               5.9.8
psycopg2                             2.9.2
psycopg2-binary                      2.9.9
ptyprocess                           0.7.0
pyasn1                               0.4.8
pyasn1-modules                       0.2.1
pycparser                            2.21
pycryptodomex                        3.11.0
pycurl                               7.44.1
Pygments                             2.17.2
PyGObject                            3.42.1
pyhcl                                0.4.4
pyhelm                               2.14.5
pyinotify                            0.9.6
PyJWT                                2.3.0
pykerberos                           1.2.4
PyNaCl                               1.5.0
pyOpenSSL                            21.0.0
pyparsing                            3.1.2
pypsrp                               0.8.1
pyrfc                                3.3.1
pyrsistent                           0.18.1
pysmi                                1.4.4
pysnmp                               6.2.4
pysnmp-mibs                          0.1.6
pysnmpcrypto                         0.0.4
PySocks                              1.7.1
pyspnego                             0.11.1
pytest                               8.1.1
pytest-ansible                       24.9.0
pytest-testinfra                     10.1.1
python-apt                           2.4.0+ubuntu4
python-daemon                        2.2.4
python-dateutil                      2.9.0.post0
python-debian                        0.1.43+ubuntu1.1
python-dotenv                        1.0.0
python-hpilo                         4.4.3
python-json-logger                   2.0.7
python-ldap                          3.4.4
python-magic                         0.4.24
python-string-utils                  1.0.0
python-tds                           1.15.0
pythran                              0.10.0
pytz                                 2022.1
pyvmomi                              8.0.3.0.1
pywinrm                              0.5.0
PyYAML                               5.4.1
referencing                          0.34.0
requests                             2.31.0
requests-kerberos                    0.12.0
requests-ntlm                        1.1.0
requests-oauthlib                    1.3.0
requests-toolbelt                    0.9.1
resolvelib                           1.0.1
rfc3986                              1.5.0
rich                                 13.7.1
roman                                3.3
rpds-py                              0.18.0
rsa                                  4.7.2
ruamel.yaml                          0.18.6
ruamel.yaml.clib                     0.2.8
s3transfer                           0.10.1
scipy                                1.8.0
SecretStorage                        3.3.1
selinux                              3.3
setuptools                           74.1.2
simplejson                           3.17.6
six                                  1.16.0
smmap                                5.0.1
sniffio                              1.3.1
sos                                  4.5.6
soupsieve                            2.3.1
ssh-import-id                        5.11
std-uritemplate                      0.0.57
stevedore                            3.5.0
subprocess-tee                       0.4.1
supermutes                           0.2.5
sympy                                1.9
systemd-python                       234
tabulate                             0.9.0
tenacity                             6.3.1
time-machine                         2.14.1
toml                                 0.10.2
tomli                                2.0.1
typing_extensions                    4.11.0
tzdata                               2024.1
uamqp                                1.6.9
ubuntu-pro-client                    8001
ufoLib2                              0.13.1
ufw                                  0.36.1
unattended-upgrades                  0.1
unicodedata2                         14.0.0
urllib3                              1.26.5
vapi-common-client                   2.44.0
vapi-runtime                         2.44.0
vcenter-bindings                     4.2.0
virtualenv                           20.13.0+ds
vmwarecloud-aws                      1.64.0
vmwarecloud-draas                    1.23.0
vsphere-automation-sdk               1.86.0
wadllib                              1.3.6
watchdog                             4.0.0
wcmatch                              8.3
webencodings                         0.5.1
websocket-client                     1.7.0
websockets                           12.0
wheel                                0.44.0
wrapt                                1.13.3
xmltodict                            0.12.0
xxhash                               3.4.1
yamllint                             1.35.1
yarl                                 1.9.4
zipp                                 1.0.0

Best Regards, David

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity. Auto close in 30 days.