I have been trying to install Openstack on centos using devstack. When I run the script, I get the following error:
[vagrant@centos64 devstack]$ ./stack.sh
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
RDO repo not detected; installing
++ proxychains /usr/bin/yum.bin install http://rdo.fedorapeople.org/openstack-havana/rdo-release-havana.rpm
ProxyChains-3.1 (http://proxychains.sf.net)
Loaded plugins: fastestmirror
You need to be root to perform this command.
[Call Trace]
./stack.sh:224:die
[ERROR] ./stack.sh:224 Error installing RDO repo, cannot continue
Now, here is /etc/sudoers.d/50_stack_sh file:
[root@centos64 devstack]# cat /etc/sudoers.d/50_stack_sh
ALL=(root) NOPASSWD:ALL
Defaults: secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin
I tried to edit it, but it says it's a read only buffer, even for root user. I tried to add vagrant user to the sudoers group by editing /etc/sudoers file, but it gave the same error as it is a read only buffer. How do I resolve this error?
The main problem that you need a password less sudo user to be able install devstack. Try to run: devstack/tools/create-stack-user.sh After that it should work.