scality / metalk8s

An opinionated Kubernetes distribution with a focus on long-term on-prem deployments
Apache License 2.0
363 stars 45 forks source link

Upgrade Salt to 3003.1 #3436

Open TeddyAndrieux opened 3 years ago

TeddyAndrieux commented 3 years ago

Component:

'salt'

Why this is needed:

To follow new Salt versions

What should be done:

Upgrade Salt to the latest version (3003.1 when this ticket get opened)

Implementation proposal (strongly recommended):

This branch https://github.com/scality/metalk8s/compare/improvement/salt-3003


May need some more investigation, An issue with Salt-API for the storage operator, I don't know if it's a bug in the new Salt version or if it's just something that changed in Salt-API (did not see anything related to this in Salt changelog).

When the storage operator tries to get the device name of a device the salt API return is wrong.

Manual tests output:

Salt API (existing device):

$ curl -Ski -b cookies.txt https://192.168.1.100:4507/ -H "Accept: application/x-yaml" -H "Content-type: application/json" -d '[{"client": "local", "tgt": "bootstrap", "fun": "metalk8s_volumes.device_name", "arg": ["/dev/loop1"]}]'
HTTP/1.1 200 OK
Content-Type: application/x-yaml
Server: CherryPy/5.6.0
Date: Wed, 30 Jun 2021 15:04:53 GMT
Allow: GET, HEAD, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: GET, POST
Access-Control-Allow-Credentials: true
Cache-Control: private
Vary: Accept-Encoding
Content-Length: 27
Set-Cookie: session_id=23be7c9b8690d47c3cc695388c337fcadcae546e; expires=Thu, 01 Jul 2021 01:04:53 GMT; Path=/

return:
- bootstrap: false

Salt call (existing device)

$ salt-call metalk8s_volumes.device_name /dev/loop1
local:
    ----------
    result:
        loop1
    success:
        True

Salt call (device that does not exist)

$ salt-call metalk8s_volumes.device_name /dev/invalid-path
local:
    ----------
    result:
        device `/dev/invalid-path` not found
    success:
        False
TeddyAndrieux commented 3 years ago

Issue about salt-api get fixed in the branch just by mounting the salt cache directory in salt-api container

TeddyAndrieux commented 3 years ago

Still another issue about salt-ssh 3003 https://github.com/saltstack/salt/issues/60620 to be investigated if it can be workarouned easily

TeddyAndrieux commented 3 years ago

Issue https://github.com/saltstack/salt/issues/60620 still there with salt-ssh 3004

Branch with 3004 https://github.com/scality/metalk8s/compare/improvement/salt-3004

TeddyAndrieux commented 1 year ago

Issue https://github.com/saltstack/salt/issues/60620 still there with salt-ssh 3005.1 (but seems fixed in 3006, which means we need to move to onedir deployment)

Branch with 3005.1 https://github.com/scality/metalk8s/compare/improvement/bump-salt-3005