<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Summary extracted from thread "[Freeipa-devel] IPA Server upgrade
    4.2 design"<br>
    <br>
    Design page:
    <a class="moz-txt-link-freetext" href="http://www.freeipa.org/page/V4/Server_Upgrade_Refactoring">http://www.freeipa.org/page/V4/Server_Upgrade_Refactoring</a><br>
    <br>
    * ipa-server-upgrade will not allow to use DM password, only LDAPI
    will be used for upgrade<br>
    * upgrade files will be executed in alphabetical order, updater will
    not require number in update file name. But we should still keep the
    numbering in new upgrade files.<br>
    * LDAP updates will be applied per file, in order specified in file
    (from top to bottom)<br>
    * new directive in update files <b>"plugin:<plugin-name>"</b>
    will execute update plugins (renamed form "update-plugin" to
    "plugin")<br>
    * option "--skip-version-check" will override version check in
    ipactl and ipa-server-upgrade commands (was --force before, but this
    collides with existing --force option in ipactl)<br>
    * huge warning, "this may broke everything", in help, man, or CLI
    for --skip-version-check option<br>
    * ipa-upgradeconfig will be removed<br>
    * ipa-ldap-updater will be changed to not allow overall update. It
    stays as util for execute particular update files.<br>
    <br>
    <br>
    How and when execute upgrades (after discussion with Honza) -- not
    updated in design page yet<br>
    A) ipactl*:<br>
    A.1) compare build platform and platform from last
    upgrade/installation  (based on used ipaplatform file)<br>
    A.1.i) if platform mismatch, raise error and prevent to start
    services<br>
    A.2)  version of LDAP data(+schema included) compared to current
    version (VENDOR_VERSION will be used)<br>
    A.2.i) if version of LDAP data is newer than version of build, raise
    error and prevent services to start<br>
    A.2.ii) if version of LDAP data is older than version of build,
    upgrade is required<br>
    A.2.iii) if versions are the same, continue<br>
    A.3) check if services requires update (this should be available
    after installer refactoring)**<br>
    A.3.i) if any service requires configuration upgrade, upgrade is
    required<br>
    A.3.ii) if any service raises an error about wrong configuration
    (which cannot be automatically fixed and requires manual fix by
    user), raise error and prevent to start services<br>
    A.4.i) if upgrade is needed, ipactl will prevent to start services,
    and promt user to run ipa-server-upgrade manually (ipactl will not
    execute upgrade itself)<br>
    A.4.ii) otherwise start services<br>
    <br>
    <br>
    B) ipa-server-upgrade*<br>
    B.0) services should be in shutdown state, if not, stop services
    (services will be started during upgrade on demand, then stopped)<br>
    B.1) compare build platform and platform from last
    upgrade/installation  (based on used ipaplatform file)<br>
    B.1.i) if platform mismatch, raise error stop upgrade<br>
    B.2) check version of LDAP data<br>
    B.2.i) if LDAP data version is newer than build version, raise error
    stop upgrade<br>
    B.2.ii) if LDAP data version is the same as build version, skip
    schema and LDAP data upgrade<br>
    B.2.iii) if LDAP data version is older than build version -->
    data upgrade required<br>
    B.3) Check if services require upgrade, detect errors as in A.3) (??
    this step may not be there)**<br>
    B.4) if data upgrade required, upgrade schema, then upgrade data, if
    successful store current build version as data version<br>
    B.5) Run service upgrade (if needed?)**<br>
    B.6) if upgrade is successful, inform user that the one can now
    start IPA (upgrade will not start IPA after it is done)<br>
    <br>
    * with --skip-version-check option, ipactl will start services,
    ipa-server-upgrade will upgrade everything<br>
    ** services will handle local configuration upgrade by themselves.
    They will not use data version to decide if upgrade is required
    (TODO implementation details, Honza wants it in this way - sharing
    code with installers)<br>
    <br>
    <br>
    Upgrade in different enviroments:<br>
    1) Upgrade during RPM transaction (as we do now) -- if it is
    possible, upgrade will be executed during RPM transaction, service
    will be started after upgrade (+ add messages "IPA is currently
    upgrading, please wait")<br>
    2) Upgrade cannot be executed during RPM transaction (fedup,
    --no-script, containers) -- IPA will not start if update is
    required, user have to run upgrade manually, using
    ipa-server-upgrade command (+ log/print errors that there is upgrade
    required)<br>
    <br>
    Martin^2<br>
    <pre class="moz-signature" cols="72">-- 
Martin Basti</pre>
  </body>
</html>