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

Install no longer works because it can't find version 2.14.2 #795

Open
slalomsk8er opened this issue Mar 6, 2025 · 8 comments
Open

Install no longer works because it can't find version 2.14.2 #795

slalomsk8er opened this issue Mar 6, 2025 · 8 comments

Comments

@slalomsk8er
Copy link

slalomsk8er commented Mar 6, 2025

Tried to install according to https://github.com/Icinga/icinga-powershell-framework/blob/master/doc/110-Installation/01-Getting-Started.md#install-icinga-for-windows
and got the following error:
Image
I suspect because the version isn't in https://packages.icinga.com/IcingaForWindows/stable/ifw.repo.json anymore.

@Al2Klimov
Copy link
Member

Hello @slalomsk8er and thank you for reporting!

In fact, https://packages.icinga.com/IcingaForWindows/stable/ifw.repo.json is autogenerated from https://packages.icinga.com/IcingaForWindows/stable/agent/.

Latter is symlinked from https://packages.icinga.com/windows/, but includes only the last three minor versions of the last four major versions. @LordHepipud explicitly requested this to keep the repo size reasonable.

I don't think one minor version more would hurt, but there's already a v2.14.6 milestone (https://github.com/Icinga/icinga2/milestone/122). Once v2.14.6 gets released, it would replace the v2.14.2 (currently v2.14.3) again.

Also, installing v2.14.2 is not a good idea by itself, see CVE-2024-49369.

Best,
A/K

@slalomsk8er
Copy link
Author

slalomsk8er commented Mar 20, 2025

@Al2Klimov I don't understand as nowhere in the script I use is a version defined. It's based on the first link and looks like this:

$ProgressPreference                         = 'SilentlyContinue';
[string]$ScriptFile                         = 'C:\Users\Public\IcingaForWindows.ps1';

Invoke-WebRequest `
    -UseBasicParsing `
    -Uri 'https://packages.icinga.com/IcingaForWindows/IcingaForWindows.ps1' `
    -OutFile $ScriptFile;

& $ScriptFile `
    -ModuleDirectory 'C:\Program Files\WindowsPowerShell\Modules\' `
    -InstallCommand '{"IfW-DirectorSelfServiceKey":{"Values":["redacted"]},"IfW-DirectorUrl":{"Values":["https://redacted/icingaweb2/director/"]}, "IfW-CAServer":{"Values":["redacted"]}
}'; 

@Al2Klimov
Copy link
Member

nowhere in the script I use is a version defined.

And in Icinga Director?

@slalomsk8er
Copy link
Author

slalomsk8er commented Mar 20, 2025

@Al2Klimov Ah this is where the version is coming from! Yes I had 2.14.2 set as agent version.
Would be great, if the director new, the versions of the master and the satellites and adjusted it accordingly.
Set variable to automatic?
Give hint in error message?

@Al2Klimov
Copy link
Member

automatic = latest?

@slalomsk8er
Copy link
Author

If I understand the recommendation correctly automatic <= satellite <= master would be perfect.

@slalomsk8er
Copy link
Author

Adding a latest would also work in my installation as I'm at most 1 1/2 week behind on the master and satellites.

@Al2Klimov
Copy link
Member

If I understand the recommendation correctly automatic <= satellite <= master would be perfect.

Forget the recommendations.

I've literally connected a v2.14.5 Windows pure agent (command endpoint only!) to my v2.2.0 master – and it checks stuff as expected:

DATATYPE::HOSTPERFDATA TIMET::1742485095 HOSTNAME::akw HOSTPERFDATA::C:\=40944803840B;;;0;53684989952 HOSTCHECKCOMMAND::wd HOSTSTATE::UP HOSTSTATETYPE::HARD

So agents on the latest version should be fine. CC @LordHepipud @lippserd @widhalmt @tbauriedel

git diff -U0

(@julianbrost During CVE-2024-49369 you wondered how to build v2.2 – here it is)

diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp
index 38525fc65..4f96570ef 100644
--- a/icinga-app/icinga.cpp
+++ b/icinga-app/icinga.cpp
@@ -341 +340,0 @@ int Main(void)
-                               return 0;
@@ -343 +342,2 @@ int Main(void)
-               } else if (command && command->GetImpersonationLevel() == ImpersonateIcinga) {
+               }
+               if (command && command->GetImpersonationLevel() == ImpersonateIcinga) {
diff --git a/lib/base/dictionary.cpp b/lib/base/dictionary.cpp
index bf03c782c..6d1933db9 100644
--- a/lib/base/dictionary.cpp
+++ b/lib/base/dictionary.cpp
@@ -70 +69,0 @@ Value Dictionary::Get(const char *key) const
-       ASSERT(!OwnsLock());
@@ -102 +100,0 @@ void Dictionary::Set(const String& key, const Value& value)
-       ASSERT(!OwnsLock());
@@ -120,2 +117,0 @@ Dictionary::Iterator Dictionary::Begin(void)
-       ASSERT(OwnsLock());
-
@@ -134,2 +129,0 @@ Dictionary::Iterator Dictionary::End(void)
-       ASSERT(OwnsLock());
-
@@ -146 +139,0 @@ size_t Dictionary::GetLength(void) const
-       ASSERT(!OwnsLock());
@@ -160 +152,0 @@ bool Dictionary::Contains(const String& key) const
-       ASSERT(!OwnsLock());
@@ -173 +164,0 @@ void Dictionary::Remove(const String& key)
-       ASSERT(!OwnsLock());
@@ -192,2 +182,0 @@ void Dictionary::Remove(Dictionary::Iterator it)
-       ASSERT(OwnsLock());
-
@@ -199 +187,0 @@ void Dictionary::CopyTo(const Dictionary::Ptr& dest) const
-       ASSERT(!OwnsLock());
diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp
index c16e41b02..3f4f27d2b 100644
--- a/lib/base/timer.cpp
+++ b/lib/base/timer.cpp
@@ -272 +272 @@ void Timer::TimerThreadProc(void)
-                       l_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000));
+                       //l_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000));
diff --git a/lib/base/tlsutility.cpp b/lib/base/tlsutility.cpp
index e2978aa12..fdb226253 100644
--- a/lib/base/tlsutility.cpp
+++ b/lib/base/tlsutility.cpp
@@ -85 +85 @@ boost::shared_ptr<SSL_CTX> MakeSSLContext(const String& pubkey, const String& pr
-       boost::shared_ptr<SSL_CTX> sslContext = boost::shared_ptr<SSL_CTX>(SSL_CTX_new(TLSv1_method()), SSL_CTX_free);
+       boost::shared_ptr<SSL_CTX> sslContext = boost::shared_ptr<SSL_CTX>(SSL_CTX_new(TLSv1_2_method()), SSL_CTX_free);
diff --git a/lib/checker/checkercomponent.cpp b/lib/checker/checkercomponent.cpp
index 806a76687..c44227b9a 100644
--- a/lib/checker/checkercomponent.cpp
+++ b/lib/checker/checkercomponent.cpp
@@ -127 +127 @@ void CheckerComponent::CheckThreadProc(void)
-                       m_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000));
+                       //m_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000));
diff --git a/lib/cli/clicommand.hpp b/lib/cli/clicommand.hpp
index a00cee8ea..f8c17e845 100644
--- a/lib/cli/clicommand.hpp
+++ b/lib/cli/clicommand.hpp
@@ -41,2 +41,2 @@ enum ImpersonationLevel
-       ImpersonateRoot,
-       ImpersonateIcinga
+       ImpersonateIcinga,
+       ImpersonateRoot = ImpersonateIcinga,

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

2 participants