salt icon indicating copy to clipboard operation
salt copied to clipboard

salt _modules not picked up after upgrade

Open jalons opened this issue 12 years ago • 6 comments

Upgraded salt-minion from 0.17.2 to 0.17.5. Initial restart of the minions did not pick up custom sync'd _modules/.

Looking on disk, the files were present: /var/cache/salt/minion/extmods/modules/cust.py /var/cache/salt/minion/extmods/modules/cust.pyc /var/cache/salt/minion/files/base/_modules/cust.py

However, calls returned cust.method were not available. Restarting the minions a second time restored functionality, as did calling saltutil.sync_modules against the remaining minions, although no files were transfered so only internal cache appears to have been modified.

jalons avatar Feb 18 '14 22:02 jalons

Interesting. What did the upgrade process look like? Strange that the second restart fixed it, I wonder if there was something different about the initial restart.

basepi avatar Feb 19 '14 21:02 basepi

The state used to upgrade the minions was https://gist.github.com/jalons/3d68c1b69722c4f95677

The package is the 0.17.5 from koji, rebuilt with a patch to enable the gitfs caching @terminalmage did.

After reporting this issue, we noticed this in two other environments (each environment has stand alone master with minions reporting to it).

I have not had a chance to look into what can/does invalidate minion side caches of _modules/, I'm presuming there's something that handles _states, _grains, and _modules? I don't see any minion side changes in the gitfs caching introduced in https://github.com/saltstack/salt/pull/9916 (which is what the local patch is based off of), so I don't believe the patch would be related.

jalons avatar Feb 20 '14 16:02 jalons

I wonder if the minion was restarted too early or something? Was that the only state that was run? I would recommend putting an order: last on that restart state to ensure that it's executed last in the state run.

Then again, it could be completely unrelated. We'll investigate.

basepi avatar Feb 20 '14 17:02 basepi

Even if the minion restarted (multiple times) during the process, I'd still expect it to find and reload anything in the local modules cache.

jalons avatar Feb 20 '14 19:02 jalons

Oh, definitely. I'm sure there's a bug here. Was just trying to figure out what was different so I could maybe get a hint on where it's breaking down.

basepi avatar Feb 21 '14 16:02 basepi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

stale[bot] avatar Dec 04 '17 21:12 stale[bot]