hilverd / vagrant-ubuntu-oracle-xe

Install Oracle 11g XE in a Vagrant virtual machine running Ubuntu 12.04.
MIT License
287 stars 96 forks source link

Oracle doesn't start after a VM halt - resume/suspend works #10

Closed justinharringa closed 10 years ago

justinharringa commented 10 years ago

After halting my VM, Oracle doesn't seem to start back up after running "vagrant up" again. resume/suspend seems to work fine (which makes plenty of sense).

I can correct this temporarily by logging into the box and starting the service again.

vagrant@oracle:~$ sudo service oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 11g Express Edition instance.

It appears that I have corrected this permanently by issuing the following:

vagrant@oracle:~$ sudo chkconfig --list
 Adding system startup for /etc/init.d/oracle-xe ...
   /etc/rc0.d/K01oracle-xe -> ../init.d/oracle-xe
   /etc/rc1.d/K01oracle-xe -> ../init.d/oracle-xe
   /etc/rc6.d/K01oracle-xe -> ../init.d/oracle-xe
   /etc/rc2.d/S80oracle-xe -> ../init.d/oracle-xe
   /etc/rc3.d/S80oracle-xe -> ../init.d/oracle-xe
   /etc/rc4.d/S80oracle-xe -> ../init.d/oracle-xe
   /etc/rc5.d/S80oracle-xe -> ../init.d/oracle-xe

I'm still developing my puppet fu but I don't seem to see anything wrong at this point. If I find a resolution, I'll be sure to share and close this out. It seems that this should make sure that oracle-xe is running:

...
  service {
    "oracle-xe":
      ensure => "running",
...

Maybe someone already knows the answer to this. Any thoughts/ideas?

hilverd commented 10 years ago

Thanks for pointing this out. I wonder if this has ever worked correctly! As you mention, the "oracle-xe": ensure => "running" bit should start Oracle but this only works when the box is being provisioned. Vagrant provisions the box using Puppet when it is first created, but if you do vagrant halt; vagrant up or vagrant reload later then Vagrant does not provision anymore -- unless you explicitly specify --provision.

Anyway, I have changed the Puppet manifest to run chkconfig based on your suggestion. This seems to have fixed it (if not then please let me know).

justinharringa commented 10 years ago

Nice! That seems to take care of it. Next time I can open a pull request. Thanks again for your work on this!