Re: Review Request 64950: Ambari Upgrade failed in case if database have no cluster_version table already. The issue with idempotence
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64950/#review194766 --- Ship it! Ship It! - Jonathan Hurley On Jan. 4, 2018, 9:44 a.m., Dmitro Lisnichenko wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64950/ > --- > > (Updated Jan. 4, 2018, 9:44 a.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-22723 > https://issues.apache.org/jira/browse/AMBARI-22723 > > > Repository: ambari > > > Description > --- > > AMBARI-21728 and AMBARI-22469 make the upgrade broken in case of several > upgrade tries, failing to follow the Idempotent upgrade paradigm. > > Issue is with: > {code} > protected void executeDDLUpdates() throws AmbariException, SQLException { > Integer currentVersionID = getCurrentVersionID();<-- > dropBrokenFK(); > updateServiceComponentDesiredStateTable(currentVersionID); > <-- > updateServiceDesiredStateTable(currentVersionID); <-- > addSelectedCollumsToClusterconfigTable(); > updateHostComponentDesiredStateTable(); > updateHostComponentStateTable(); > dropStaleTables(); <-- > updateUpgradeTable(); > createUpgradeHistoryTable(); > updateRepositoryVersionTable(); > renameServiceDeletedColumn(); > addLegacyColumn(); > expandUpgradeItemItemTextColumn(); > addViewUrlPKConstraint(); > removeStaleConstraints(); > } > {code} > > {{getCurrentVersionID()}} trying to query non-existing table and failing > whole upgrade > > > Diffs > - > > > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java > 391a6f567e > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java > 6ba1671cdf > > ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java > e93cd1303a > > > Diff: https://reviews.apache.org/r/64950/diff/1/ > > > Testing > --- > > mvn clean test > live cluster check > > > Thanks, > > Dmitro Lisnichenko > >
Re: Review Request 64950: Ambari Upgrade failed in case if database have no cluster_version table already. The issue with idempotence
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64950/#review194759 --- Ship it! Ship It! - Nate Cole On Jan. 4, 2018, 9:44 a.m., Dmitro Lisnichenko wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64950/ > --- > > (Updated Jan. 4, 2018, 9:44 a.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-22723 > https://issues.apache.org/jira/browse/AMBARI-22723 > > > Repository: ambari > > > Description > --- > > AMBARI-21728 and AMBARI-22469 make the upgrade broken in case of several > upgrade tries, failing to follow the Idempotent upgrade paradigm. > > Issue is with: > {code} > protected void executeDDLUpdates() throws AmbariException, SQLException { > Integer currentVersionID = getCurrentVersionID();<-- > dropBrokenFK(); > updateServiceComponentDesiredStateTable(currentVersionID); > <-- > updateServiceDesiredStateTable(currentVersionID); <-- > addSelectedCollumsToClusterconfigTable(); > updateHostComponentDesiredStateTable(); > updateHostComponentStateTable(); > dropStaleTables(); <-- > updateUpgradeTable(); > createUpgradeHistoryTable(); > updateRepositoryVersionTable(); > renameServiceDeletedColumn(); > addLegacyColumn(); > expandUpgradeItemItemTextColumn(); > addViewUrlPKConstraint(); > removeStaleConstraints(); > } > {code} > > {{getCurrentVersionID()}} trying to query non-existing table and failing > whole upgrade > > > Diffs > - > > > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java > 391a6f567e > > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java > 6ba1671cdf > > ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java > e93cd1303a > > > Diff: https://reviews.apache.org/r/64950/diff/1/ > > > Testing > --- > > mvn clean test > live cluster check > > > Thanks, > > Dmitro Lisnichenko > >
Re: Review Request 64950: Ambari Upgrade failed in case if database have no cluster_version table already. The issue with idempotence
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64950/ --- (Updated Jan. 4, 2018, 4:44 p.m.) Review request for Ambari, Jonathan Hurley and Nate Cole. Bugs: AMBARI-22723 https://issues.apache.org/jira/browse/AMBARI-22723 Repository: ambari Description --- AMBARI-21728 and AMBARI-22469 make the upgrade broken in case of several upgrade tries, failing to follow the Idempotent upgrade paradigm. Issue is with: {code} protected void executeDDLUpdates() throws AmbariException, SQLException { Integer currentVersionID = getCurrentVersionID();<-- dropBrokenFK(); updateServiceComponentDesiredStateTable(currentVersionID); <-- updateServiceDesiredStateTable(currentVersionID); <-- addSelectedCollumsToClusterconfigTable(); updateHostComponentDesiredStateTable(); updateHostComponentStateTable(); dropStaleTables(); <-- updateUpgradeTable(); createUpgradeHistoryTable(); updateRepositoryVersionTable(); renameServiceDeletedColumn(); addLegacyColumn(); expandUpgradeItemItemTextColumn(); addViewUrlPKConstraint(); removeStaleConstraints(); } {code} {{getCurrentVersionID()}} trying to query non-existing table and failing whole upgrade Diffs - ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java 391a6f567e ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java 6ba1671cdf ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java e93cd1303a Diff: https://reviews.apache.org/r/64950/diff/1/ Testing (updated) --- mvn clean test live cluster check Thanks, Dmitro Lisnichenko
Review Request 64950: Ambari Upgrade failed in case if database have no cluster_version table already. The issue with idempotence
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64950/ --- Review request for Ambari, Jonathan Hurley and Nate Cole. Bugs: AMBARI-22723 https://issues.apache.org/jira/browse/AMBARI-22723 Repository: ambari Description --- AMBARI-21728 and AMBARI-22469 make the upgrade broken in case of several upgrade tries, failing to follow the Idempotent upgrade paradigm. Issue is with: {code} protected void executeDDLUpdates() throws AmbariException, SQLException { Integer currentVersionID = getCurrentVersionID();<-- dropBrokenFK(); updateServiceComponentDesiredStateTable(currentVersionID); <-- updateServiceDesiredStateTable(currentVersionID); <-- addSelectedCollumsToClusterconfigTable(); updateHostComponentDesiredStateTable(); updateHostComponentStateTable(); dropStaleTables(); <-- updateUpgradeTable(); createUpgradeHistoryTable(); updateRepositoryVersionTable(); renameServiceDeletedColumn(); addLegacyColumn(); expandUpgradeItemItemTextColumn(); addViewUrlPKConstraint(); removeStaleConstraints(); } {code} {{getCurrentVersionID()}} trying to query non-existing table and failing whole upgrade Diffs - ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java 391a6f567e ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java 6ba1671cdf ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java e93cd1303a Diff: https://reviews.apache.org/r/64950/diff/1/ Testing --- mvn clean test Thanks, Dmitro Lisnichenko