GithubHelp home page GithubHelp logo

Comments (23)

jgoodall avatar jgoodall commented on July 17, 2024

I dont have a CentOS 5 machine, but according to the instructions, it should be possible on any system that has Python 2.4 or higher: http://docs.ansible.com/intro_installation.html#latest-release-via-yum

You do need a machine capable of virtualization to use VirtualBox. Does your BIOS not have the option to turn it on?

Can you try a 32-bit guest OS by changing the following line in the Vagrantfile, from:

config.vm.box = "hashicorp/precise64"

To:

config.vm.box = "hashicorp/precise32"

from dev-setup.

gerth avatar gerth commented on July 17, 2024

I don't think CentOS 5 is the issue. Just wanted to put it in the subject
line to set the context. It's clearly the hardware virtualization question.
I thought about trying 32-bit. It'll probably work, but is really pointless
since a 4G machine isn't going to cut it. I'm going to look at the BIOS when
I get to campus later.

Thanks for the URLs

John Gerth [email protected] Gates 378 (650) 725-3273

On 3/3/15 7:08 AM, John Goodall wrote:

I dont have a CentOS 5 machine, but according to the instructions, it should be possible on any system that has Python 2.4 or higher:
http://docs.ansible.com/intro_installation.html#latest-release-via-yum

You do need a machine capable of virtualization to use VirtualBox. Does your BIOS not have the option to turn it on
http://helpdeskgeek.com/how-to/enable-virtualization-in-the-bios/?

Can you try a 32-bit guest OS by changing the following line in the |Vagrantfile| https://github.com/stucco/dev-setup/blob/master/Vagrantfile#L24, from:

|config.vm.box = "hashicorp/precise64"
|

To:

|config.vm.box = "hashicorp/precise32"
|


Reply to this email directly or view it on GitHub #8 (comment).

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Turned on Intel VX-T in the BIOS of this Supermicro 64G Intel 2 x Xeon E5430 box
and now "vagrant up" actually sees the boot happening, but the machine doesn't get up.

Since vagrant recommends that have the VB gui up, I did that, removed the /quiet from the Ubuntu 64 boot
and see that the machine boots, but not appear to be on the network, i.e. can't ping the expected 10.10.10.100

Next I changed the boot line to "single" and that got me to the point where I see that
the VM has IP 10.0.2.15 and voila the VB log (below) shows that what VB's DHCP gave it.
However, out on the host, netstat (belows) shows 10.10.10.0 as expected.
Looking at the network configs, it says the adapter1 is NAT and adapter2 is Host-only Adapter.

From the single user console, I can ping and ssh to the outside world because this is a NAT.
But precisely because this is a NAT, my VM won't get any inbound connects from vagrant.
Clearly we need more provisioning to get a reachable IP for the VM.

Because I just started on Monday, I happened to pick up the newest VB 4.3.24 so perhaps
VB changed the networking defaults?

Dazed and confused,
/J

on the host

netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 vboxnet0

VB log

00:23:45.101999 Guest Log: vboxguest: major 0, IRQ 20, I/O port d020, MMIO at 00000000f0400000 (size 0x400000)
00:23:46.750455 NAT: adding domain name Stanford.edu
00:23:46.750476 NAT: DNS#0: 171.64.64.64
00:23:46.750484 NAT: DNS#1: 171.64.7.55
00:23:46.750487 NAT: DNS#2: 171.64.7.77
00:23:46.750495 NAT: DHCP offered IP address 10.0.2.15
00:23:46.753761 NAT: DHCP offered IP address 10.0.2.15
00:23:54.705927 UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
00:23:54.724948 UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
00:23:55.120954 NAT: DHCP offered IP address 10.0.2.15

from dev-setup.

gerth avatar gerth commented on July 17, 2024

VirtualBox docs confirm that NAT is now the default for networking:
https://www.virtualbox.org/manual/ch06.html#network_nat

...so, need new configuratioin settings to put it back
to whatever you had working before

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Whoa....during the meeting I brought the VM from the VB gui, logged in as vagrant,
poked around a bit and then did "poweroff".

Then I did a "vagrant up" and much to my suprise things got much, much further (see below).
Networking might still be an issue, but I can do the ssh via localhost 2222 portmapping so it's
not totally dead, but I do see the problematic IP 10.10.10.100 mentioned in ansible's barf.

If you have a working VB system, we can compare

Dazed and confused,

/J

John Gerth [email protected] Gates 378 (650) 725-3273

~/stucco $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if its present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /home/gerth/stucco
default: /stucco-shared => /home/gerth
==> default: Running provisioner: ansible...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o
ControlPersist=60s' ansible-playbook --private-key=/home/gerth/stucco/.vagrant/machines/default/virtualbox/private_key --user=vagrant --connection=ssh
--limit='default' --inventory-file=provisioning/inventory --extra-vars={"ansible_ssh_user":"vagrant","host_ip":"10.10.10.100"} provisioning/site.yml
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 44, in ?
import ansible.playbook
File "/usr/lib/python2.4/site-packages/ansible/playbook/init.py", line 18, in ?
import ansible.inventory
File "/usr/lib/python2.4/site-packages/ansible/inventory/init.py", line 25, in ?
import ansible.constants as C
File "/usr/lib/python2.4/site-packages/ansible/constants.py", line 76
except ConfigParser.Error as e:
^
SyntaxError: invalid syntax
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Working with Mike this afternoon, I realized the problem was python 2.4 and ansible needs 2.6 so
a) installed python26 from epel repository
b) went a bunch more rounds with "vagrant up" acquiring other python26 bits
c) rebuilt the ansible rpm from ansible git
...still no love. ansible complained about lack of ssh option ControlPersist
d) as recommended removed ControlPersist from [ssh_connection] section of /etc/ansible/ansible.cfg
but still no love (console below). Guessed that the ssh_args must be overridden somewhere, but
grep didn't find anything.

Dazed and confused,

  • tail of vagrant up console
    *
    ==> default: Running provisioner: ansible...
    PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/home/gerth/stucco/.vagrant/machines/default/virtualbox/private_key --user=vagrant --connection=ssh --limit='default' --inventory-file=provisioning/inventory --extra-vars={"ansible_ssh_user":"vagrant","host_ip":"10.10.10.100"} provisioning/site.yml

PLAY [all] ********************************************************************

GATHERING FACTS ***************************************************************
fatal: [stucco] => using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" (or ssh_args in [ssh_connection] section of the config file) before running again

TASK: [jgoodall.common | install common packages (build-essential, git, mercurial, supervisor, unzip, rsync, curl, wget)] ***
FATAL: no hosts matched or all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/u/gerth/site.retry

stucco : ok=0 changed=0 unreachable=1 failed=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Hmmmmm...this looks relevant

http://blog.rlucas.net/bugfix/vagrant-ansible-ssh-older-openssh-controlpersist/

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Tried the override suggest by rlucas in Vagrantfile:
ansible.raw_ssh_args=[]
and then adding
config.ssh.forward_agent=false
No luck....no apparent effect as ssh gets the same args as before

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

Added note specifying python 2.6 is required for Ansible: 40c68f0

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

Is there any ssh_args in any of the ansible configuration files?

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

Can you confirm the output of man ssh | grep ControlPersist is blank?

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

For reference, there is a vagrant issue related to ControlPersist. The suggestion is to set raw_ssh_args, as you did. Can you try setting it to:

ansible.raw_ssh_args=['']

Note the quotes. Alternatively, we can require the host OS has at least OpenSSH 5.6, which is when the ControlPersist argument was added. Would prefer a workaround though.

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Yes, forcing null string seems like a good idea, but something is still causing that full args string to appear. (Also, I had tried specifying ssh_args in ansible.cfg and grepped for it in the whole stucco tree but didn't find anything). Disappointing that ansible, or vagrant's use of it, is so opaque.

CentOS 5 openssh is 4.3 and while it's technically possible to build the rpm for 5.6 or higher, this is not something you'd want to impose on folks who want to run the demo.

If you want to give up on CentOS 5, I'm prepared to blow this machine away and install CentOS 6 or Ubuntu. (This would be the machine I would use to host a reference stucco server later on).

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

Looks like CentOS 6 has v 5.3 (openssh-5.3p1-104.el6.x86_64.rpm). We have tested on Ubuntu 12.04 and 14.04, could you try on CentOS 7?

from dev-setup.

gerth avatar gerth commented on July 17, 2024

RedHat often does backports and the man page openssh 5.3 ssh_config has ControlPersist.
CentOS 6 is way more prevalent than 7 so I'd like to try that first if we've given up on CentOS 5.

On 3/5/15 8:28 AM, John Goodall wrote:

Looks like CentOS 6 has v 5.3 (|openssh-5.3p1-104.el6.x86_64.rpm|). We have tested on Ubuntu 12.04 and 14.04, could you try on CentOS 7?

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

Sure, that is fine. But I think it needs OpenSSH >= 5.6, so if CentOS 6 can do that, great.

from dev-setup.

gerth avatar gerth commented on July 17, 2024

The problem with RHEL is that version shown on the rpm or reported by the app is not reliable
due to backporting. Personally, I disklike this, but they explain why they do this:
https://access.redhat.com/security/updates/backporting

By "it needs OpenSSH >= 5.6" , do you mean ansible ?

On 3/5/15 9:05 AM, John Goodall wrote:

Sure, that is fine. But I think it needs OpenSSH >= 5.6, so if CentOS 6 can do that, great.

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

If ansible/vagrant requires ControlPersist and we cant figure out a way around that, then ControlPersist was added in OpenSSH version 5.6, according to release notes

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Ack...just confirming that we're giving up on looking for a way
to override the ansible ssh_args.

On 3/5/15 9:16 AM, John Goodall wrote:

If ansible/vagrant requires |ControlPersist| and we cant figure out a way around that, then |ControlPersist| was added in OpenSSH version 5.6,
according to release notes http://www.openssh.com/txt/release-5.6

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

If the [''] didnt work, not sure what else to try.

from dev-setup.

gerth avatar gerth commented on July 17, 2024

Likewise... just, didn't know if there was an ansible guru around who might have the answer.
The best I could do was that blog entry last night, but it didn't work.

On 3/5/15 10:27 AM, John Goodall wrote:

If the |['']| didnt work, not sure what else to try.


Reply to this email directly or view it on GitHub #8 (comment).

from dev-setup.

gerth avatar gerth commented on July 17, 2024

We decided to spin up a CentOS 6 VM to make sure things work before I do the bare metal.
I notice on the dev/setup page that we specify 10G and 4 cores, but how much disk should
I provision on the "host" (we'll be VM under VM).

from dev-setup.

jgoodall avatar jgoodall commented on July 17, 2024

20-30gb should be good.

from dev-setup.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.