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

YUM client side script not deploying automatically #87

Open
swampdogmash opened this issue Oct 10, 2024 · 10 comments
Open

YUM client side script not deploying automatically #87

swampdogmash opened this issue Oct 10, 2024 · 10 comments

Comments

@swampdogmash
Copy link
Contributor

I have a feeling there is an obvious answer to this, but I recently upgraded my CheckMK server from 2.3.0p17 to 2.3.0p18 (at home not the much larger install at work). I then upgraded the YUM MKP from 2.4.4 to 2.5.1 and re-baked packages for the single agent that I deploy the yum plugin onto using an agent rule. It is a Cloud edition server and I noticed that the AGENT upgraded, but the YUM plugin that was previously deployed into /usr/lib/check_mk_agent/plugins/300 was removed. No other options were changed, just an update to the plugin and the version number.

Has something changed in 2.5.1 from 2.4.4 that would prevent the plugin being packaged correctly into the RPM for install - I did open the RPM and there was no YUM plugin file in the archive.

@HenriWahl
Copy link
Owner

@swampdogmash sorry for the late reply.
I installed plugin version 2.5.1 on a little outdated 2.3.0p9 Checkmk instance and found the plugin baked into the agent RPM file. Maybe latest Checkmk server version causes this problem?

@gurubert
Copy link
Contributor

The bakery plugin file in the MKP version 2.5.2 is empty.

@HenriWahl
Copy link
Owner

@gurubert which on exactly?

@gurubert
Copy link
Contributor

This file was present but empty: https://github.com/HenriWahl/checkmk-agent-plugin-yum/blob/master/lib/python3/cmk/base/cee/plugins/bakery/yum.py

After I pasted the content the bakery was able to bake the plugin into the package.

@HenriWahl
Copy link
Owner

HenriWahl commented Nov 18, 2024

How can this happen? I downloaded the MKP file and extracted all included TARs:

[4.0K]  .
├── [4.0K]  agent_based
│   └── [ 11K]  yum.py
├── [4.0K]  agents
│   └── [4.0K]  plugins
│       └── [6.0K]  yum
├── [4.0K]  checkman
│   └── [ 699]  yum
├── [ 628]  info
├── [ 555]  info.json
├── [4.0K]  lib
│   └── [4.0K]  python3
│       └── [4.0K]  cmk
│           └── [4.0K]  base
│               └── [4.0K]  cee
│                   └── [4.0K]  plugins
│                       └── [4.0K]  bakery
│                           └── [ 447]  yum.py
└── [4.0K]  web
    └── [4.0K]  plugins
        └── [4.0K]  wato
            ├── [1.7K]  yum_cee.py
            └── [2.0K]  yum_check_parameters.py

Edit: I think I found it...

@gurubert
Copy link
Contributor

I don't know.

@HenriWahl
Copy link
Owner

I assume the file lib/python3/cmk/base/cee/plugins/bakery/yum.py should be moved completely to lib/check_mk/base/cee/plugins/bakery/yum.py?

@HenriWahl
Copy link
Owner

At least this was the location in the previously working 2.4.4 release. Comparing with https://github.com/HenriWahl/checkmk-agent-plugin-kubernetes-namespaces/blob/main/mkp/lib/python3/cmk/base/cee/plugins/bakery/kubernetes_namespaces.py this lib/python3-path should work anyway, so I am pretty confused.

@gurubert
Copy link
Contributor

I assume the file lib/python3/cmk/base/cee/plugins/bakery/yum.py should be moved completely to lib/check_mk/base/cee/plugins/bakery/yum.py?

Both are the same path. $OMD_ROOT/local/lib/check_mk is a symbolic link to $OMD_ROOT/local/lib/python3/cmk.

@HenriWahl
Copy link
Owner

So this gets even weirder, especially while the MKP I downloaded contains all needed files.

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

No branches or pull requests

3 participants