diff options
author | Martin Basti <mbasti@redhat.com> | 2015-04-10 15:42:58 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-05-04 11:16:26 +0000 |
commit | 9f049ca14403f3696d54d186e6b1b15181f055df (patch) | |
tree | 80c4c6d0b2d9e0b584322a931a729560e274c174 /ipaplatform | |
parent | 39426966063b3f3deced90ef3f5d0a87801d7eab (diff) | |
download | freeipa-9f049ca14403f3696d54d186e6b1b15181f055df.tar.gz freeipa-9f049ca14403f3696d54d186e6b1b15181f055df.tar.xz freeipa-9f049ca14403f3696d54d186e6b1b15181f055df.zip |
Server Upgrade: Verify version and platform
Verify version and platform before upgrade or ipactl start|restart
Upgrade:
* do not allow upgrade on different platforms
* do not allow upgrade data with higher version than build has
Start:
* do not start services if platform mismatch
* do not start services if upgrade is needed
* do not start services if data with higher version than build has
New ipactl options:
--skip-version-check: do not validate IPA version
--ignore-service-failures (was --force): ignore if a service start fail
and continue with starting other services
--force: combine --skip-version-check and --ignore-service-failures
https://fedorahosted.org/freeipa/ticket/4904
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaplatform')
-rw-r--r-- | ipaplatform/__init__.py | 22 | ||||
-rw-r--r-- | ipaplatform/__init__.py.in | 12 | ||||
-rw-r--r-- | ipaplatform/base/tasks.py | 10 |
3 files changed, 22 insertions, 22 deletions
diff --git a/ipaplatform/__init__.py b/ipaplatform/__init__.py deleted file mode 100644 index cf342aa3f..000000000 --- a/ipaplatform/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Authors: -# Tomas Babej <tbabej@redhat.com> -# -# Copyright (C) 2014 Red Hat -# see file 'COPYING' for use and warranty information -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -''' -Module containing platform-specific functionality for every platform. -''' diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in new file mode 100644 index 000000000..61f6f3c4a --- /dev/null +++ b/ipaplatform/__init__.py.in @@ -0,0 +1,12 @@ +# +# Copyright (C) 2015 FreeIPA Contributors see COPYING for license +# + +''' +Module containing platform-specific functionality for every platform. +''' + +NAME = "__PLATFORM__" + +# FIXME: too much cyclic dependencies +# from __PLATFORM__ import paths, tasks, services diff --git a/ipaplatform/base/tasks.py b/ipaplatform/base/tasks.py index ff71c2bd1..10c5e835d 100644 --- a/ipaplatform/base/tasks.py +++ b/ipaplatform/base/tasks.py @@ -24,6 +24,9 @@ This module contains default platform-specific implementations of system tasks. import pwd import grp + +from pkg_resources import parse_version + from ipaplatform.paths import paths from ipapython.ipa_log_manager import log_mgr from ipapython import ipautil @@ -208,5 +211,12 @@ class BaseTaskNamespace(object): else: log.debug('user %s exists', name) + def parse_ipa_version(self, version): + """ + :param version: textual version + :return: object implementing proper __cmp__ method for version compare + """ + return parse_version(version) + task_namespace = BaseTaskNamespace() |