<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question &amp;quot;Upgrade&amp;quot; table missing from Ambari database in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159200#M24564</link>
    <description>&lt;P&gt;Hello- I the process of upgrading Ambari to 2.2.1.1 I hit the following error after $ ambari-server upgrade:&lt;/P&gt;&lt;PRE&gt;06 Apr 2016 13:22:52,129 ERROR [main] SchemaUpgradeHelper:315 - Exception occurred during upgrade, failed
org.apache.ambari.server.AmbariException: Errors found while populating the upgrade table with values for columns upgrade_type and upgrade_package.
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executePreDMLUpdates(SchemaUpgradeHelper.java:215)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:302)
Caused by: org.apache.ambari.server.AmbariException: Errors found while populating the upgrade table with values for columns upgrade_type and upgrade_package.&lt;/PRE&gt;&lt;P&gt;Took a look at my (external) Postgres database and found the ambari database does not have an "upgrade" table. I checked another cluster with a similar external Postgres instance and it does have that table.&lt;/P&gt;&lt;P&gt;Should I create the table manually? If so, anyone have the appropriate create statement for the table? If there's a more ambari-friendly way get the tables straight, that would be preferable. Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2016 01:01:00 GMT</pubDate>
    <dc:creator>bcobb</dc:creator>
    <dc:date>2016-04-07T01:01:00Z</dc:date>
    <item>
      <title>"Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159200#M24564</link>
      <description>&lt;P&gt;Hello- I the process of upgrading Ambari to 2.2.1.1 I hit the following error after $ ambari-server upgrade:&lt;/P&gt;&lt;PRE&gt;06 Apr 2016 13:22:52,129 ERROR [main] SchemaUpgradeHelper:315 - Exception occurred during upgrade, failed
org.apache.ambari.server.AmbariException: Errors found while populating the upgrade table with values for columns upgrade_type and upgrade_package.
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executePreDMLUpdates(SchemaUpgradeHelper.java:215)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:302)
Caused by: org.apache.ambari.server.AmbariException: Errors found while populating the upgrade table with values for columns upgrade_type and upgrade_package.&lt;/PRE&gt;&lt;P&gt;Took a look at my (external) Postgres database and found the ambari database does not have an "upgrade" table. I checked another cluster with a similar external Postgres instance and it does have that table.&lt;/P&gt;&lt;P&gt;Should I create the table manually? If so, anyone have the appropriate create statement for the table? If there's a more ambari-friendly way get the tables straight, that would be preferable. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:01:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159200#M24564</guid>
      <dc:creator>bcobb</dc:creator>
      <dc:date>2016-04-07T01:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159201#M24565</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1972/bcobb.html" nodeid="1972"&gt;@Brenden Cobb&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From what ambari version are you upgrading?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:03:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159201#M24565</guid>
      <dc:creator>jluniya</dc:creator>
      <dc:date>2016-04-07T01:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159202#M24566</link>
      <description>&lt;P&gt;Ambari 2.1.2.1&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:07:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159202#M24566</guid>
      <dc:creator>bcobb</dc:creator>
      <dc:date>2016-04-07T01:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159203#M24567</link>
      <description>&lt;P&gt;This is happening during the upgrade to Ambari 2.2.0
&lt;A href="https://github.com/apache/ambari/blob/release-2.2.1-rc2/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java#L508-L598" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.2.1-rc2/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java#L508-L598&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What is the output of running,&lt;/P&gt;&lt;PRE&gt;SELECT upgrade_id, cluster_id, from_version, to_version, direction, upgrade_package, upgrade_type FROM upgrade;
&lt;/PRE&gt;&lt;P&gt;Basically, you have to populate the upgrade_type and upgrade_pack columns based on the versions used.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:14:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159203#M24567</guid>
      <dc:creator>afernandez</dc:creator>
      <dc:date>2016-04-07T01:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159204#M24568</link>
      <description>&lt;P&gt;Thanks, but since I don't have an "upgrade" table I can't run a select.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:31:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159204#M24568</guid>
      <dc:creator>bcobb</dc:creator>
      <dc:date>2016-04-07T01:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159205#M24569</link>
      <description>&lt;P&gt;I believe, the failure seems to be caused while setting "upgrade_package" column for existing entries in the upgrade DB because there is no repo_version DB entry that matches with the from_version entry for a DOWNGRADE entry in the upgrade table.&lt;/P&gt;&lt;P&gt;However, I do believe the upgrade DB table should exist as it also existed in 2.1.2.1 and we dont delete the table. You can check your DB dump before the upgrade to verify if the table existed&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 04:09:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159205#M24569</guid>
      <dc:creator>jluniya</dc:creator>
      <dc:date>2016-04-08T04:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159206#M24570</link>
      <description>&lt;P&gt;This happened because a record may be missing in the repo_version table. If you insert the record before performing the Ambari Upgrade it should work.

You can make sure you have a record for each one of the versions.
&lt;/P&gt;&lt;PRE&gt;SELECT from_version, to_version FROM upgrade;

-- Assuming 2.2.0.0-2041 is missing
INSERT INTO repo_version (repo_version_id, version, display_name, upgrade_package, repositories, stack_id) VALUES (1, '2.2.0.0-2041', 'HDP-2.2.0.0-2041', 'upgrade-2.2', '', (SELECT stack_id FROM stack WHERE stack_version = '2.2'));&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Apr 2016 06:14:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159206#M24570</guid>
      <dc:creator>afernandez</dc:creator>
      <dc:date>2016-04-08T06:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Upgrade" table missing from Ambari database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159208#M24572</link>
      <description>&lt;P&gt;Accepting &lt;A rel="user" href="https://community.cloudera.com/users/326/afernandez.html" nodeid="326"&gt;@Alejandro Fernandez&lt;/A&gt; 's answer as this is what we essentially did, but I definitely recommend treading cautiously and of course backup your database before making changes. This does appear to be a bug.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 01:16:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/quot-Upgrade-quot-table-missing-from-Ambari-database/m-p/159208#M24572</guid>
      <dc:creator>bcobb</dc:creator>
      <dc:date>2016-04-12T01:16:37Z</dc:date>
    </item>
  </channel>
</rss>

