Blame SOURCES/0002-Change-DNA-no-range-from-SUCCESS-to-WARNING.patch

23f808
From acd807b6e054b06b7b6fafe86741e00bae7d2527 Mon Sep 17 00:00:00 2001
23f808
From: Rob Crittenden <rcritten@redhat.com>
23f808
Date: Tue, 30 Jul 2019 17:25:30 -0400
23f808
Subject: [PATCH] Change DNA no range from SUCCESS to WARNING
23f808
23f808
Elevate the not set version to WARNING so admins can be aware in
23f808
advance that with no range then uid/gid cannot be allocated from
23f808
this master. This is particularly important if the only master with
23f808
a range defined is retired.
23f808
23f808
https://github.com/freeipa/freeipa-healthcheck/issues/60
23f808
---
23f808
 src/ipahealthcheck/ipa/dna.py | 6 ++++--
23f808
 tests/test_ipa_dna.py         | 2 +-
23f808
 2 files changed, 5 insertions(+), 3 deletions(-)
23f808
23f808
diff --git a/src/ipahealthcheck/ipa/dna.py b/src/ipahealthcheck/ipa/dna.py
23f808
index 9dd2ffa..4d85057 100644
23f808
--- a/src/ipahealthcheck/ipa/dna.py
23f808
+++ b/src/ipahealthcheck/ipa/dna.py
23f808
@@ -41,9 +41,11 @@ class IPADNARangeCheck(IPAPlugin):
23f808
                          next_start=next_start or 0,
23f808
                          next_max=next_max or 0)
23f808
         else:
23f808
-            yield Result(self, constants.SUCCESS,
23f808
+            yield Result(self, constants.WARNING,
23f808
                          range_start=0,
23f808
                          range_max=0,
23f808
                          next_start=0,
23f808
                          next_max=0,
23f808
-                         msg='No range defined')
23f808
+                         msg='No DNA range defined. If no masters define a '
23f808
+                             'range then users and groups cannot be '
23f808
+                             'created.')
23f808
diff --git a/tests/test_ipa_dna.py b/tests/test_ipa_dna.py
23f808
index 0ff7dd4..3d5dd3e 100644
23f808
--- a/tests/test_ipa_dna.py
23f808
+++ b/tests/test_ipa_dna.py
23f808
@@ -66,7 +66,7 @@ class TestDNARange(BaseTest):
23f808
         assert len(self.results) == 1
23f808
 
23f808
         result = self.results.results[0]
23f808
-        assert result.result == constants.SUCCESS
23f808
+        assert result.result == constants.WARNING
23f808
         assert result.source == 'ipahealthcheck.ipa.dna'
23f808
         assert result.check == 'IPADNARangeCheck'
23f808
         assert result.kw.get('range_start') == 0
23f808
-- 
23f808
2.20.1
23f808