<?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 Re: ambari-server upgrade + how to automate the question - have made a backup of the Ambari Server database in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221866#M74829</link>
    <description>&lt;P&gt;You could make use of option    "-s"  or "--silent",&lt;/P&gt;&lt;P&gt;like in     &lt;/P&gt;&lt;P&gt;ambari-server upgrade -s&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 18:10:22 GMT</pubDate>
    <dc:creator>samuel_peeters</dc:creator>
    <dc:date>2018-12-04T18:10:22Z</dc:date>
    <item>
      <title>ambari-server upgrade + how to automate the question - have made a backup of the Ambari Server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221864#M74827</link>
      <description>&lt;P&gt;how to automate the question ( we need to set it as always yes )&lt;/P&gt;&lt;PRE&gt; - have made a backup of the Ambari Server database [y/n] (y)&lt;/PRE&gt;&lt;P&gt;when performing &lt;STRONG&gt;ambari-server upgrade&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;we need to automate this because we use the ambari-server upgrade in bash script  &lt;/P&gt;&lt;PRE&gt;ambari-server upgrade

Using python  /usr/bin/pythonUpgrading ambari-serverINFO: Upgrade Ambari ServerINFO: Updating Ambari Server properties in ambari.properties
...WARNING: Can not find ambari.properties.rpmsave file from
previous version, skipping import of settingsINFO: Updating Ambari Server properties in ambari-env.sh ...INFO: Can not find ambari-env.sh.rpmsave file from previous
version, skipping restore of environment settings. ambari-env.sh may not
include any user customization.INFO: Fixing database objects ownerAmbari Server configured for Embedded Postgres. Confirm you


have made a backup of the Ambari Server database [y/n] (y)?

INFO: Upgrading database schemaINFO: Return code from schema upgrade command, retcode = 0INFO: Console output from schema upgrade command:INFO: {"lzo_enabled":"false"}INFO: Schema upgrade completedAdjusting ambari-server permissions and ownership...Ambari Server 'upgrade' completed successfully.&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:56:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221864#M74827</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-02-21T22:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: ambari-server upgrade + how to automate the question - have made a backup of the Ambari Server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221865#M74828</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can use "expect" utility offered by Linux as following:&lt;BR /&gt;&lt;STRONG&gt;1. Install that package:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# yum install expect -y &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;2. Create a file as following as "/tmp/test.sh"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/expect 
set timeout 20
spawn /usr/sbin/ambari-server upgrade
expect "Ambari Server configured for Postgres. Confirm you have made a backup of the Ambari Server database" { send "y\n" }
interact&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Notice&lt;/STRONG&gt; i am passing "y". here { send "y\n" } which means it will take my input as "yes"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Give execute permission to the script and then run it&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# chmod 755 /tmp/test.sh
# /tmp/test.sh

OUTPUT:
---------

# /tmp/test.sh 
spawn /usr/sbin/ambari-server upgrade
Using python  /usr/bin/python
Upgrading ambari-server
INFO: Upgrade Ambari Server
INFO: Updating Ambari Server properties in ambari.properties ...
WARNING: Can not find ambari.properties.rpmsave file from previous version, skipping import of settings
INFO: Updating Ambari Server properties in ambari-env.sh ...
INFO: Can not find ambari-env.sh.rpmsave file from previous version, skipping restore of environment settings. ambari-env.sh may not include any user customization.
INFO: Fixing database objects owner
Ambari Server configured for Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
INFO: Upgrading database schema
INFO: Return code from schema upgrade command, retcode = 0
INFO: Schema upgrade completed
Adjusting ambari-server permissions and ownership...
Ambari Server 'upgrade' completed successfully.&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Notice i am passing "y". here { send "y\n" } which means it will take my input as "yes"&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 08:10:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221865#M74828</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-22T08:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: ambari-server upgrade + how to automate the question - have made a backup of the Ambari Server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221866#M74829</link>
      <description>&lt;P&gt;You could make use of option    "-s"  or "--silent",&lt;/P&gt;&lt;P&gt;like in     &lt;/P&gt;&lt;P&gt;ambari-server upgrade -s&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 18:10:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ambari-server-upgrade-how-to-automate-the-question-have-made/m-p/221866#M74829</guid>
      <dc:creator>samuel_peeters</dc:creator>
      <dc:date>2018-12-04T18:10:22Z</dc:date>
    </item>
  </channel>
</rss>

