Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update salt-minion to 3004 and python310 #5017

Merged
merged 13 commits into from
Mar 6, 2022

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Dec 22, 2021

Motivation: Making mileage from @arnebjarne and try to simplify salt-minion package while migrating this last bit to python 3.10

Linked issues: #4845, saltstack/salt#61384
Closes: #4847

Checklist

  • Build rule all-supported completed successfully
  • Package upgrade completed successfully
  • New installation of package completed successfully

@th0ma7 th0ma7 self-assigned this Dec 22, 2021
spk/salt-minion/Makefile Outdated Show resolved Hide resolved
spk/salt-minion/Makefile Outdated Show resolved Hide resolved
@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 22, 2021

@hgy59 as an FYI, it's still not fully baked yet. The daemon stops after a few seconds for an unknown reason. May be due to the lack of installed salt-master instance, duno, will investigate with current version to confirm expected behavior.

Feel free to chim-in if you have a hint on this.

And BTW, that in conjunction of the other PR would address all python3 use-cases we have, potentially leading to a bit of clean-up afterwards.

@hgy59
Copy link
Contributor

hgy59 commented Dec 22, 2021

Feel free to chim-in if you have a hint on this.

I found that probably the patch at installation time does not work as expected. The installer log shows that a salt-wheel is built before the patch is applied. I have no clue whether wheels created with pip install will be prefered over the python files in the
If libcrypto.so is not found at runtime, we might need to create and package the salt wheel into the spk.

extract of installer log (DSM 6, aarch64)


2021/12/22 20:23:02     Collecting salt==3004
2021/12/22 20:23:02       Downloading salt-3004.tar.gz (17.7 MB)
2021/12/22 20:23:19       Installing build dependencies: started
2021/12/22 20:23:37       Installing build dependencies: finished with status 'done'
2021/12/22 20:23:37       Getting requirements to build wheel: started
2021/12/22 20:23:42       Getting requirements to build wheel: finished with status 'done'
2021/12/22 20:23:42       Preparing metadata (pyproject.toml): started
2021/12/22 20:23:46       Preparing metadata (pyproject.toml): finished with status 'done'
2021/12/22 20:23:46     Processing /volume1/@appstore/salt-minion/share/wheelhouse/setproctitle-1.2.2-cp310-cp310-linux_aarch64.whl
2021/12/22 20:23:46     Collecting six==1.16.0
2021/12/22 20:23:46       Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
2021/12/22 20:23:46     Collecting tempora==4.1.1
2021/12/22 20:23:46       Downloading tempora-4.1.1-py3-none-any.whl (15 kB)
2021/12/22 20:23:47     Processing /volume1/@appstore/salt-minion/share/wheelhouse/timelib-0.2.5-cp310-cp310-linux_aarch64.whl
2021/12/22 20:23:47     Collecting urllib3==1.26.6
2021/12/22 20:23:47       Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
2021/12/22 20:23:47     Collecting zc.lockfile==1.4
2021/12/22 20:23:47       Downloading zc.lockfile-1.4.tar.gz (11 kB)
2021/12/22 20:23:47       Preparing metadata (setup.py): started
2021/12/22 20:23:49       Preparing metadata (setup.py): finished with status 'done'
2021/12/22 20:23:49     Collecting zipp==3.5.0
2021/12/22 20:23:49       Downloading zipp-3.5.0-py3-none-any.whl (5.7 kB)
2021/12/22 20:23:53     Collecting certifi>=2017.4.17
2021/12/22 20:23:53       Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
2021/12/22 20:23:57     Collecting setuptools
2021/12/22 20:23:57       Downloading setuptools-60.0.4-py3-none-any.whl (952 kB)
2021/12/22 20:23:58     Building wheels for collected packages: contextvars, patch, pycparser, rpm-vercmp, salt, zc.lockfile
2021/12/22 20:23:58       Building wheel for contextvars (setup.py): started
2021/12/22 20:24:00       Building wheel for contextvars (setup.py): finished with status 'done'
2021/12/22 20:24:00       Created wheel for contextvars: filename=contextvars-2.4-py3-none-any.whl size=7680 sha256=adfe3cb5a03768c8d0e67f8722465aa788b13e5859c77fe3268cac090fbb669e
2021/12/22 20:24:00       Stored in directory: /volume1/@appstore/salt-minion/var/pip-cache/wheels/f9/2c/c9/4b330908a23ee28818243dbd3925b0a5254f8bb9d659bf6b6a
2021/12/22 20:24:00       Building wheel for patch (setup.py): started
2021/12/22 20:24:02       Building wheel for patch (setup.py): finished with status 'done'
2021/12/22 20:24:02       Created wheel for patch: filename=patch-1.16-py3-none-any.whl size=12402 sha256=db2c2e586ead75a5d24afa1ff4eab8d07c80bbe91d992d4663cd84b512e0f28d
2021/12/22 20:24:02       Stored in directory: /volume1/@appstore/salt-minion/var/pip-cache/wheels/9e/0b/47/01a46968b6646ca3efa32e23ed436e0c819aca97ec2c136573
2021/12/22 20:24:02       Building wheel for pycparser (setup.py): started
2021/12/22 20:24:06       Building wheel for pycparser (setup.py): finished with status 'done'
2021/12/22 20:24:06       Created wheel for pycparser: filename=pycparser-2.17-py2.py3-none-any.whl size=196062 sha256=01afba7ed941882e477c74a5007b6adb70bf933cf76867b7b89e593737d8e188
2021/12/22 20:24:06       Stored in directory: /volume1/@appstore/salt-minion/var/pip-cache/wheels/cf/ac/e8/1e93444fb9206800ef04a57da9b7c30161909ee656c185e5c1
2021/12/22 20:24:06       Building wheel for rpm-vercmp (setup.py): started
2021/12/22 20:24:08       Building wheel for rpm-vercmp (setup.py): finished with status 'done'
2021/12/22 20:24:08       Created wheel for rpm-vercmp: filename=rpm_vercmp-0.1.2-py3-none-any.whl size=9957 sha256=22ede38b59c3c28189ea01dd64f25fe9ced32ffa9b19251c964ad408ccd968ee
2021/12/22 20:24:08       Stored in directory: /volume1/@appstore/salt-minion/var/pip-cache/wheels/a2/b7/48/557cd60dedba81713b283f93b7c89d3bb0603219972df8a035
2021/12/22 20:24:08       Building wheel for salt (pyproject.toml): started
2021/12/22 20:24:33       Building wheel for salt (pyproject.toml): finished with status 'done'
2021/12/22 20:24:33       Created wheel for salt: filename=salt-3004-py3-none-any.whl size=9639715 sha256=5a8a196945aff57b8526a1d23f78eeb016219004453fb541687d89aede96a583
2021/12/22 20:24:33       Stored in directory: /volume1/@appstore/salt-minion/var/pip-cache/wheels/99/9c/2c/64441892f02dfe925780a5bfce93e528be51c9bb6f5e064491
2021/12/22 20:24:33       Building wheel for zc.lockfile (setup.py): started
2021/12/22 20:24:35       Building wheel for zc.lockfile (setup.py): finished with status 'done'
2021/12/22 20:24:35       Created wheel for zc.lockfile: filename=zc.lockfile-1.4-py3-none-any.whl size=9374 sha256=884067655e38fdf4d745df25463087c465558bb3e3eed380aee2fdc4e5434d64
2021/12/22 20:24:35       Stored in directory: /volume1/@appstore/salt-minion/var/pip-cache/wheels/d7/b0/ec/5e8061c94b839f913f648c7fdd91c853d867c649972e4243a6
2021/12/22 20:24:35     Successfully built contextvars patch pycparser rpm-vercmp salt zc.lockfile
2021/12/22 20:24:38     WARNING: Installing from a newer Wheel-Version (1.1)
2021/12/22 20:24:39     Installing collected packages: six, more-itertools, pytz, pycparser, jaraco.functools, urllib3, tempora, setuptools, MarkupSafe, jaraco.text, jaraco.classes, immutables, idna, chardet, cffi, certifi, zipp, zc.lockfile, requests, pyzmq, PyYAML, pycryptodomex, psutil, portend, msgpack, Jinja2, jaraco.collections, distro, cryptography, contextvars, cheroot, timelib, setproctitle, salt, rpm-vercmp, python-gnupg, python-dateutil, pyOpenSSL, patch, importlib-metadata, CherryPy
2021/12/22 20:24:39       Attempting uninstall: six
2021/12/22 20:24:39         Found existing installation: six 1.16.0
2021/12/22 20:24:39         Not uninstalling six at /volume1/@appstore/python310/lib/python3.10/site-packages, outside environment /volume1/@appstore/salt-minion/env
2021/12/22 20:24:39         Can't uninstall 'six'. No files were found to uninstall.
2021/12/22 20:24:42       Attempting uninstall: setuptools
2021/12/22 20:24:42         Found existing installation: setuptools 57.4.0
2021/12/22 20:24:43         Uninstalling setuptools-57.4.0:
2021/12/22 20:24:43           Successfully uninstalled setuptools-57.4.0
2021/12/22 20:24:48       Attempting uninstall: certifi
2021/12/22 20:24:48         Found existing installation: certifi 2021.10.8
2021/12/22 20:24:48         Not uninstalling certifi at /volume1/@appstore/python310/lib/python3.10/site-packages, outside environment /volume1/@appstore/salt-minion/env
2021/12/22 20:24:48         Can't uninstall 'certifi'. No files were found to uninstall.
2021/12/22 20:25:32       WARNING: Installing from a newer Wheel-Version (1.1)
2021/12/22 20:25:32       WARNING: Installing from a newer Wheel-Version (1.1)
2021/12/22 20:25:35     Successfully installed CherryPy-18.6.1 Jinja2-2.11.3 MarkupSafe-1.1.1 PyYAML-5.4.1 certifi-2021.10.8 cffi-1.14.6 chardet-3.0.4 cheroot-8.5.2 contextvars-2.4 cryptography-3.3.2 distro-1.5.0 idna-2.10 immutables-0.15 importlib-metadata-4.8.3 jaraco.classes-3.2.1 jaraco.collections-3.4.0 jaraco.functools-2.0 jaraco.text-3.5.1 more-itertools-5.0.0 msgpack-1.0.2 patch-1.16 portend-2.4 psutil-5.8.0 pyOpenSSL-19.1.0 pycparser-2.17 pycryptodomex-3.9.8 python-dateutil-2.8.1 python-gnupg-0.4.4 pytz-2021.1 pyzmq-20.0.0 requests-2.25.1 rpm-vercmp-0.1.2 salt-3004 setproctitle-1.2.2 setuptools-60.0.4 six-1.16.0 tempora-4.1.1 timelib-0.2.5 urllib3-1.26.6 zc.lockfile-1.4 zipp-3.5.0
2021/12/22 20:25:37     Installed modules:
2021/12/22 20:25:41     backports.entry-points-selectable==1.1.1
2021/12/22 20:25:41     certifi==2021.10.8
2021/12/22 20:25:41     cffi==1.14.6
2021/12/22 20:25:41     chardet==3.0.4
2021/12/22 20:25:41     cheroot==8.5.2
2021/12/22 20:25:41     CherryPy==18.6.1
2021/12/22 20:25:41     contextvars==2.4
2021/12/22 20:25:41     cryptography==3.3.2
2021/12/22 20:25:41     distlib==0.3.4
2021/12/22 20:25:41     distro==1.5.0
2021/12/22 20:25:41     filelock==3.4.0
2021/12/22 20:25:41     idna==2.10
2021/12/22 20:25:41     immutables==0.15
2021/12/22 20:25:41     importlib-metadata==4.8.3
2021/12/22 20:25:41     jaraco.classes==3.2.1
2021/12/22 20:25:41     jaraco.collections==3.4.0
2021/12/22 20:25:41     jaraco.functools==2.0
2021/12/22 20:25:41     jaraco.text==3.5.1
2021/12/22 20:25:41     Jinja2==2.11.3
2021/12/22 20:25:41     MarkupSafe==1.1.1
2021/12/22 20:25:41     more-itertools==5.0.0
2021/12/22 20:25:41     msgpack==1.0.2
2021/12/22 20:25:41     patch==1.16
2021/12/22 20:25:41     platformdirs==2.4.0
2021/12/22 20:25:41     portend==2.4
2021/12/22 20:25:41     psutil==5.8.0
2021/12/22 20:25:41     pycparser==2.17
2021/12/22 20:25:41     pycryptodomex==3.9.8
2021/12/22 20:25:41     pyOpenSSL==19.1.0
2021/12/22 20:25:41     python-dateutil==2.8.1
2021/12/22 20:25:41     python-gnupg==0.4.4
2021/12/22 20:25:41     pytz==2021.1
2021/12/22 20:25:41     PyYAML==5.4.1
2021/12/22 20:25:41     pyzmq==20.0.0
2021/12/22 20:25:41     requests==2.25.1
2021/12/22 20:25:41     rpm-vercmp==0.1.2
2021/12/22 20:25:41     salt==3004
2021/12/22 20:25:41     setproctitle==1.2.2
2021/12/22 20:25:41     six==1.16.0
2021/12/22 20:25:41     tempora==4.1.1
2021/12/22 20:25:41     timelib==0.2.5
2021/12/22 20:25:41     urllib3==1.26.6
2021/12/22 20:25:41     virtualenv==20.9.0
2021/12/22 20:25:41     zc.lockfile==1.4
2021/12/22 20:25:41     zipp==3.5.0
2021/12/22 20:25:41     /volume1/@appstore/salt-minion/env/bin/python
2021/12/22 20:25:42     End service_postinst

the line 2021/12/22 20:25:41 /volume1/@appstore/salt-minion/env/bin/python at the bottom comes from which pyhton that I added just before the patch in service_postinst.

@hgy59
Copy link
Contributor

hgy59 commented Dec 22, 2021

When I remove the PID_FILE definition in service-setup.sh and modify the SERVICE_COMMAND to:

SERVICE_COMMAND="salt-minion -c ${SYNOPKG_PKGDEST}/etc -d --pid-file=${PID_FILE} --log-file=${LOG_FILE}"

I get the following logfile:

# cat salt-minion.log
Wed Dec 22 20:25:50 CET 2021
Starting salt-minion command salt-minion -c /volume1/@appstore/salt-minion/etc -d --pid-file=/volume1/@appstore/salt-minion/var/salt-minion.pid --log-file=/volume1/@appstore/salt-minion/var/salt-minion.log
2021-12-22 20:25:52,331 [salt.cli.daemons :291 ][INFO    ][3885] Setting up the Salt Minion "ds-arm"
2021-12-22 20:25:52,333 [salt.utils.process:244 ][INFO    ][3885] pidfile: /volume1/@appstore/salt-minion/var/process_responsibility_salt-minion.pid not found
2021-12-22 20:25:53,236 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'base64_encode' as a jinja filter
2021-12-22 20:25:53,238 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'base64_decode' as a jinja filter
2021-12-22 20:25:53,238 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'md5' as a jinja filter
2021-12-22 20:25:53,239 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'sha1' as a jinja filter
2021-12-22 20:25:53,240 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'sha256' as a jinja filter
2021-12-22 20:25:53,240 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'sha512' as a jinja filter
2021-12-22 20:25:53,240 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'hmac' as a jinja filter
2021-12-22 20:25:53,241 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'hmac_compute' as a jinja filter
2021-12-22 20:25:53,241 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'random_hash' as a jinja filter
2021-12-22 20:25:53,242 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'rand_str' as a jinja filter
2021-12-22 20:25:53,242 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'file_hashsum' as a jinja filter
2021-12-22 20:25:53,853 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'http_query' as a jinja filter
2021-12-22 20:25:53,875 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'strftime' as a jinja filter
2021-12-22 20:25:53,876 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'date_format' as a jinja filter
2021-12-22 20:25:53,954 [salt.utils.decorators.jinja              :75  ][DEBUG   ][3885] Marking 'raise' as a jinja global
2021-12-22 20:25:53,955 [salt.utils.decorators.jinja              :51  ][DEBUG   ][3885] Marking 'match' as a jinja test
2021-12-22 20:25:53,956 [salt.utils.decorators.jinja              :51  ][DEBUG   ][3885] Marking 'equalto' as a jinja test
2021-12-22 20:25:53,956 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'skip' as a jinja filter
2021-12-22 20:25:53,957 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'sequence' as a jinja filter
2021-12-22 20:25:53,957 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'to_bool' as a jinja filter
2021-12-22 20:25:53,958 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'indent' as a jinja filter
2021-12-22 20:25:53,958 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'tojson' as a jinja filter
2021-12-22 20:25:53,959 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'quote' as a jinja filter
2021-12-22 20:25:53,959 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'regex_escape' as a jinja filter
2021-12-22 20:25:53,960 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'regex_search' as a jinja filter
2021-12-22 20:25:53,960 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'regex_match' as a jinja filter
2021-12-22 20:25:53,960 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'regex_replace' as a jinja filter
2021-12-22 20:25:53,961 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'uuid' as a jinja filter
2021-12-22 20:25:53,961 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'unique' as a jinja filter
2021-12-22 20:25:53,962 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'min' as a jinja filter
2021-12-22 20:25:53,962 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'max' as a jinja filter
2021-12-22 20:25:53,962 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'avg' as a jinja filter
2021-12-22 20:25:53,963 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'union' as a jinja filter
2021-12-22 20:25:53,963 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'intersect' as a jinja filter
2021-12-22 20:25:53,964 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'difference' as a jinja filter
2021-12-22 20:25:53,964 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'symmetric_difference' as a jinja filter
2021-12-22 20:25:53,964 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'method_call' as a jinja filter
2021-12-22 20:25:53,967 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'yaml_dquote' as a jinja filter
2021-12-22 20:25:53,968 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'yaml_squote' as a jinja filter
2021-12-22 20:25:53,968 [salt.utils.decorators.jinja              :27  ][DEBUG   ][3885] Marking 'yaml_encode' as a jinja filter
2021-12-22 20:25:54,178 [salt.log.setup                           :704 ][DEBUG   ][3885] Stopping the multiprocessing logging queue listener
2021-12-22 20:25:54,681 [salt.log.setup                           :712 ][DEBUG   ][3885] closing multiprocessing queue
2021-12-22 20:25:54,682 [salt.log.setup                           :714 ][DEBUG   ][3885] joining multiprocessing queue thread
2021-12-22 20:25:54,684 [salt.log.setup                           :728 ][DEBUG   ][3885] Stopped the multiprocessing logging queue listener
2021-12-22 20:25:54,733 [salt.utils.process                       :316 ][DEBUG   ][3945] Created pidfile: /volume1/@appstore/salt-minion/var/salt-minion.pid
2021-12-22 20:25:54,739 [salt.cli.daemons                         :89  ][INFO    ][3945] Starting up the Salt Minion
salt-minion is not running

The pidfile: /volume1/@appstore/salt-minion/var/process_responsibility_salt-minion.pid is created and exists after start.
The file /volume1/@appstore/salt-minion/var/salt-minion.pid is not created and no related log entry is created (except that "Created"). Without an existing ${PID_FILE} the status is reported as stopped.

EDIT:
process_responsibility_salt-minion.pidis not a normal pid file:
# cat process_responsibility_salt-minion.pid | jq

{
  "pid": 3885,
  "name": "/volume1/@appst",
  "start_time": 1640201150.79
}

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 22, 2021

I found that probably the patch at installation time does not work as expected.

the line 2021/12/22 20:25:41 /volume1/@appstore/salt-minion/env/bin/python at the bottom comes from which pyhton that I added just before the patch in service_postinst.

There is no output from using the python patch.py and testing on my end worked out properly (but there might be somethine I missed?). Also here is the updated output:

$ vi /volume1/@appstore/salt-minion/env/lib/python3.10/site-packages/salt/utils/rsax931.py
...
 76                 else:
 77                     lib = glob.glob("/opt/freeware/lib/libcrypto.so*")
 78                 lib = lib[0] if lib else None
 79             else:
 80                 lib = glob.glob("/var/packages/python310/target/lib/libcrypto.so*")
 81                 lib = lib[0] if lib else None
 82     if not lib:
 83         raise OSError("Cannot locate OpenSSL libcrypto")
 84     return lib

And good catch with the pid file. I'll rework that side of things and see if this hint brings me somewhere...
Also note that manually started-up (as root) worked (e.g. the daemon kept running). So perhaps indeed its a question of PID or a question of port number?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 23, 2021

@hgy59 I believe I now have found my last remaining issue: when salt-minion start it ends-up forking into a new PID and my assumption is that the start-stop-status script loose sight of it.

For instance it starts-up with:

sc-salt+ 22523 22512  0 20:30 ?        00:00:00 /bin/sh /var/packages/salt-minion/scripts/start-stop-status start
sc-salt+ 22530 22523  0 20:30 ?        00:00:00 /volume1/@appstore/salt-minion/env/bin/python3 /volume1/@appstore/salt-minion/env/bin/salt-minion -c /volume1/@appstore/salt-minion/etc -d

And then right before stopping:

sc-salt+ 22523 22512  0 20:30 ?        00:00:00 /bin/sh /var/packages/salt-minion/scripts/start-stop-status start
sc-salt+ 22582     1  6 20:30 ?        00:00:01 /volume1/@appstore/salt-minion/env/bin/python3 /volume1/@appstore/salt-minion/env/bin/salt-minion -c /volume1/@appstore/salt-minion/etc -d KeepAlive MultiMinionProcessManager MinionProcessManager
sc-salt+ 23065 22523  0 20:30 ?        00:00:00 sleep 1

EDIT: And found it! Two issues, a) the service-setup.sh was re-declaring a PID_FILE variable and b) it mandatory needs to be passed the --pid-file ${PID_FILE} parameter for it to work, using the original PID_FILE variable and not a newly re-declared one.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 24, 2021

@hgy59 before I merge this, should I move the configuration currently in target/etc/ into var/etc instead or leaving it as is? Any thoughts?

@arnebjarne
Copy link
Contributor

Hi @th0ma7 . You have tagged me in this issue. Do you need any work done by me or was it just a note-to-self ?

BR & Happy Holidays
Bjarne

Motivation: Making mileage from @arnebjarne and try to simplify salt-minion package while migrating this last bit to python 3.10 Linked issues: #4845, saltstack/salt#61384

Checklist

* [ ]  Build rule `all-supported` completed successfully

* [ ]  Package upgrade completed successfully

* [ ]  New installation of package completed successfully

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 27, 2021

Hi @th0ma7 . You have tagged me in this issue. Do you need any work done by me or was it just a note-to-self ?

BR & Happy Holidays Bjarne

No, I was just making the linkage with you previous work. But you're welcome to join in if you like, cheers and happy holidays!

@publicarray
Copy link
Member

@th0ma7 I would strongly prefer if your "import commit" has the correct author information attached in git. (I dislike the imports you do as it removes the author information in git). Alternatively merge he's PR first. Or better clone he's branch and work off of that, so we retain the original history.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 2, 2022

@publicarray thnx for the info and I'll try to remind adding @arnebjarne as co-author. Note that I had took good care of linking all PR and prior work. Also, indeed this PR is heavily influenced by his great work but is also significantly adapted/different.

@th0ma7 th0ma7 mentioned this pull request Jan 3, 2022
10 tasks
@th0ma7 th0ma7 changed the title Update salt-minion to 3004 and python310 [WIP] Update salt-minion to 3004 and python310 Jan 6, 2022
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 7, 2022

@SynoCommunity/developers advice needed: current etc containing configuration files sits under target. I could move it under var or under etc (e.g. @appconf). Or for now I could add a pre-post upgrade to backup/reclaim the files as we used to for DSM6.

OR, when I'll finish-up the work on var (still have one last pending PR to complete) and shortly thereafter include etc, that would fix these use cases.

@ymartin59
Copy link
Contributor

@th0ma7 Probably I have not located the installation variable file at the most relevant place... Do not hesitate to move it to "standard" location according to DSM developer guide, so I guess @appconf

Co-authored-by: Bjarne Saltbaek <arnebjarne72@hotmail.com>
@th0ma7
Copy link
Contributor Author

th0ma7 commented Mar 2, 2022

@arnebjarne I finally found time to come back on this PR. Would you mind giving it a try? It now uses the latest spksrc python framework changes and includes most of your proposed changes from your original PR.

Otherwise I think its now ready for merge & publish.

@th0ma7 th0ma7 changed the title [WIP] Update salt-minion to 3004 and python310 Update salt-minion to 3004 and python310 Mar 2, 2022
@th0ma7 th0ma7 requested a review from hgy59 March 2, 2022 15:23
Co-Author:Bjarne Saltbaek <arnebjarne72@hotmail.com>
@th0ma7
Copy link
Contributor Author

th0ma7 commented Mar 5, 2022

@arnebjarne I've ended-up migrating over the salt-master portion of your code onto this PR as well. If you have a few cycles to go over it that'd be much appreciated. Thnx in advance.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Mar 6, 2022

Tested on: x64-7.0, x64-6.1

# /usr/local/bin/salt --version
salt 3004

@th0ma7 th0ma7 merged commit a5c601e into SynoCommunity:master Mar 6, 2022
@th0ma7 th0ma7 deleted the salt-py310 branch March 6, 2022 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Salt Minion and Salt Master updates
5 participants