jenkins-bot has submitted this change and it was merged.

Change subject: Stop 'stdin: is not a tty' complaints
......................................................................


Stop 'stdin: is not a tty' complaints

Change the shell command used by vagrant when communicating with the VM
from the default `bash -l` to `bash -c 'BASH_ENV=/etc/profile exec
bash'`. This bypasses the /root/.profile script containing the unguarded
`mesg -n` command which triggers the error message.

This work around is slightly superior to the prior solution of editing
the mesg invocation out of /root/.profile as it takes effect prior to
the initial puppet run.

Change-Id: I635882877e8bbf11599d687e79f82d80a729d213
---
M Vagrantfile
M puppet/modules/misc/manifests/init.pp
2 files changed, 4 insertions(+), 9 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Vagrantfile b/Vagrantfile
index c5f7c25..fdecff7 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -47,6 +47,10 @@
         config.vm.box_download_insecure = true
     end
 
+    # Stop all of the 'stdin: is not a tty' complaints during provisioning
+    # See https://github.com/mitchellh/vagrant/issues/1673
+    config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+
     config.vm.network :private_network,
         ip: '10.11.12.13'
 
diff --git a/puppet/modules/misc/manifests/init.pp 
b/puppet/modules/misc/manifests/init.pp
index 6d84f25..d4c0f41 100644
--- a/puppet/modules/misc/manifests/init.pp
+++ b/puppet/modules/misc/manifests/init.pp
@@ -5,15 +5,6 @@
 # command-line tools, like 'ack' and 'curl'.
 #
 class misc {
-    # This solves the 'stdin: not a tty' error message, which is caused
-    # by a call to 'mesg n' in /root/.profile. Sadly it'll still appear
-    # once, since profile is sourced before Puppet can run. That sucks,
-    # because first impressions do count. Fix it and you get a cookie.
-    exec { 'update profile':
-        command => 'sed -i -e "s/^mesg n/tty -s \&\& mesg n/" /root/.profile',
-        onlyif  => 'grep -q "^mesg n" /root/.profile',
-    }
-
     file { '/var/lib/cloud/instance/':
         ensure => directory,
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/120481
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I635882877e8bbf11599d687e79f82d80a729d213
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to