[one-users] CentOS-7 mainline GenericCloud test image
Javier Fontan
jfontan at opennebula.org
Wed Sep 24 06:54:15 PDT 2014
Here is the problem.
There is already a configuration file for eth0 that is configured for
dhcp. When the system starts it tries to start network service but
gives an error as there is no dhcp server. "network.target" is not
started. The sshd service depends on "network.target" so it does not
start.
The way cloud-init configures the network is with "ifup" command. This
configures the interface with the OpenNebula provided info but even if
the network is up the service is not. This happens after the network
service gives error.
I see two ways to fix this:
* Delete /etc/sysconfig/network-interfaces/ifcfg-eth0
* Add this patch to cloud-init to restart network service (the first
lines are already in DataSourceOpenNebula.py, just added the
start/stop network):
--8<------
# apply static network configuration only in 'local' dsmode
if ('network-interfaces' in results and self.dsmode == "local"):
LOG.debug("Updating network interfaces from %s", self)
self.distro.apply_network(results['network-interfaces'])
try:
(out, _err) = util.subp(["systemctl", "stop", "network"])
(out, _err) = util.subp(["systemctl", "start", "network"])
except util.ProcessExecutionError:
util.logexc(LOG, "Restart network command failed")
------>8--
Another thing I would do is to delete the nameserver already
configured in /etc/resolv.com:
--8<------
nameserver 10.0.2.3
------>8--
Another thing I've noticed is that NetworkManager is no longer
installed in the image. It was in previous versions.
On Tue, Sep 23, 2014 at 3:46 PM, Javier Fontan <jfontan at opennebula.org> wrote:
> There is another bigger problem. I've found out that I had a DHCP
> server running in my machine. Deactivating it configures the IP
> correctly (can be pinged) but SSH is inaccessible (port closed?). It
> also adds the DNS configuration but there is already a nameserver in
> /etc/resolv.conf in the original image. Can you delete or make the
> file /etc/resolv.conf empty in the image?
>
> After restarting the VM it works correctly. I'm looking into the SSH problem.
>
> On Tue, Sep 23, 2014 at 3:28 PM, Javier Fontan <jfontan at opennebula.org> wrote:
>> IP, hostname and SSH key configuration work but not DNS configuration.
>> I think it worked in older versions of the image. Any change in the
>> cloud-init code?
>>
>> On Fri, Sep 19, 2014 at 12:18 PM, Karanbir Singh <mail-lists at karan.org> wrote:
>>> hi,
>>>
>>> http://cloud.centos.org/centos/7/devel/CentOS-7-x86_64-GenericCloud-20140917_02.qcow2
>>>
>>> sha256: 836934ff633a7c8accabe44a1196f0b89b4553c29fb270c7d44798000ea6f35a
>>>
>>> This is the last Release Candidate for the Generic cloud mainline image,
>>> these will be build and released monthly to include all security updates
>>> and bugfix's.
>>>
>>> These are compressed qcow2 images, with cloud-init and growpart utils
>>> installed, root logins are deprecated in favour of default 'centos' logins.
>>>
>>> Please test, and I will monitor this thread for comments. unless there
>>> is a major blocker, I will move to release this early next week.
>>>
>>> Please note : this is a common image, and repsents an identical
>>> footprint on all official centos images in public and private clouds.
>>>
>>> Regards and thanks for the work that Javier Fontan did to bring in the
>>> opennebula support to cloud-init,
>>>
>>> --
>>> Karanbir Singh
>>> +44-207-0999389 | http://www.karan.org/ | twitter.com/kbsingh
>>> GnuPG Key : http://www.karan.org/publickey.asc
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>>
>> --
>> Javier Fontán Muiños
>> Developer
>> OpenNebula - Flexible Enterprise Cloud Made Simple
>> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>
>
>
> --
> Javier Fontán Muiños
> Developer
> OpenNebula - Flexible Enterprise Cloud Made Simple
> www.OpenNebula.org | @OpenNebula | github.com/jfontan
--
Javier Fontán Muiños
Developer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | @OpenNebula | github.com/jfontan
More information about the Users
mailing list