<?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>topic Re: How do I bypass yes response to enable maintenance-mode question on cluster master? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232998#M8706</link>
    <description>&lt;P&gt;if it's not accepting STDIN you can use "expect"... should be available on most Linux distro...&lt;/P&gt;

&lt;P&gt;Script something like (test.exp):&lt;BR /&gt;
    &lt;CODE&gt;#!/usr/bin/expect&lt;/CODE&gt;&lt;BR /&gt;
     &lt;CODE&gt;spawn /path_to_splunk/bin/splunk enable maintenance-mode -auth user:pass&lt;/CODE&gt;&lt;BR /&gt;
      &lt;CODE&gt;expect {Warning*}&lt;/CODE&gt;&lt;BR /&gt;
       &lt;CODE&gt;send "y\r"&lt;/CODE&gt;&lt;BR /&gt;
        &lt;CODE&gt;expect eof&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;run the script ./test.exp&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2015 22:29:34 GMT</pubDate>
    <dc:creator>Yasaswy</dc:creator>
    <dc:date>2015-09-22T22:29:34Z</dc:date>
    <item>
      <title>How do I bypass yes response to enable maintenance-mode question on cluster master?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232997#M8705</link>
      <description>&lt;P&gt;I need a quick answer to a question:&lt;/P&gt;

&lt;P&gt;for the command:&lt;/P&gt;

&lt;P&gt;./splunk enable maintenance-mode -auth user:password&lt;/P&gt;

&lt;P&gt;always requires you answer "y" to the question:&lt;/P&gt;

&lt;P&gt;"Warning: In maintenance mode, the cluster master will not attempt to replace any missing replicated or searchable bucket copies. This mode should be enabled only while performing maintenance on peers. Do you want to continue? [y/n]: "&lt;/P&gt;

&lt;P&gt;and will not accept "y" on stdin, how do I bypass?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 13:21:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232997#M8705</guid>
      <dc:creator>wlth09</dc:creator>
      <dc:date>2015-09-22T13:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bypass yes response to enable maintenance-mode question on cluster master?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232998#M8706</link>
      <description>&lt;P&gt;if it's not accepting STDIN you can use "expect"... should be available on most Linux distro...&lt;/P&gt;

&lt;P&gt;Script something like (test.exp):&lt;BR /&gt;
    &lt;CODE&gt;#!/usr/bin/expect&lt;/CODE&gt;&lt;BR /&gt;
     &lt;CODE&gt;spawn /path_to_splunk/bin/splunk enable maintenance-mode -auth user:pass&lt;/CODE&gt;&lt;BR /&gt;
      &lt;CODE&gt;expect {Warning*}&lt;/CODE&gt;&lt;BR /&gt;
       &lt;CODE&gt;send "y\r"&lt;/CODE&gt;&lt;BR /&gt;
        &lt;CODE&gt;expect eof&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;run the script ./test.exp&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 22:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232998#M8706</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2015-09-22T22:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bypass yes response to enable maintenance-mode question on cluster master?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232999#M8707</link>
      <description>&lt;P&gt;To all, I also found a second way to answer this as I did not want to require extra software on my hosts and am currently using ssh.  If you pipe the command:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;/path_to_splunk/bin/splunk enable maintenance-mode -auth user:pass&lt;BR /&gt;
y&lt;BR /&gt;
exit&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;to ssh and you are good to go, you can do the same with:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;/path_to_splunk/bin/splunk --accept-license start -auth user:pass&lt;BR /&gt;
y&lt;BR /&gt;
exit&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;to migrate and start splunk after an upgrade.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:30:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/232999#M8707</guid>
      <dc:creator>wlth09</dc:creator>
      <dc:date>2020-09-29T07:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bypass yes response to enable maintenance-mode question on cluster master?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/233000#M8708</link>
      <description>&lt;P&gt;Have you tried?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk enable maintenance-mode --answer-yes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Seems to work on 6.2 and later.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 20:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/233000#M8708</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2016-06-20T20:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bypass yes response to enable maintenance-mode question on cluster master?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/233001#M8709</link>
      <description>&lt;P&gt;This is an older question but I figured I would respond anyway just in case someone else comes along looking for the answer like I did.&lt;/P&gt;

&lt;P&gt;To enable:  $SPLUNK_HOME/bin/splunk enable maintenance-mode -auth user:pass --answer-yes&lt;/P&gt;

&lt;P&gt;To disable:  $SPLUNK_HOME/bin/splunk disable maintenance-mode -auth user:pass --answer-yes&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 13:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/233001#M8709</guid>
      <dc:creator>snrlopez</dc:creator>
      <dc:date>2017-09-13T13:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bypass yes response to enable maintenance-mode question on cluster master?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/233002#M8710</link>
      <description>&lt;P&gt;I have tried following and it works fine as expected. It will solve the issue. No need to install any third party tool like expect&lt;/P&gt;

&lt;P&gt;/ama/apt/splunk/bin/splunk enable  maintenance-mode --answer-yes --no-prompt&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 06:48:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-bypass-yes-response-to-enable-maintenance-mode-question/m-p/233002#M8710</guid>
      <dc:creator>hsaifee</dc:creator>
      <dc:date>2019-07-09T06:48:23Z</dc:date>
    </item>
  </channel>
</rss>

