Google Start-up scripts missing, google daemons don't run.

1,199 views
Skip to first unread message

Steve McD

unread,
May 25, 2017, 8:56:41 AM5/25/17
to gce-discussion
Hi all,

Had some problems updating the SDK on Ubuntu 16.04.1 LTS. The standard apt-get install failed. Then tried apt-get delete then install again, which also both failed. I finally found a google instruction that allowed allowed me to get the latest version of SDK running. The instruction was to rm -r the /usr/lib/google-cloud-sdk and re-install. It now works fine.

However, this has somehow done a very tidy removal of the google start up scripts and the daemons therefore don't run on boot. I logged an error wth the SDK team, no help yet. Lucky I had ssh access from another VM as without the daemons browser ssh does not work.

How do I reinstall the start-up scripts?

I have read https://github.com/GoogleCloudPlatform/compute-image-packages but this does not look right for google created VMs


Marilu (Cloud Platform Support)

unread,
May 25, 2017, 11:54:08 AM5/25/17
to gce-discussion
Hello Steven,

The Google startup script on a Ubuntu 16.04 LTS instance are located on directory '/usr/bin/', so the it appears that the 'rm' command that you performed shouldn't have removed the startup scripts.

I'll recommend reviewing the following links for further details on the Google startup scripts:

You also mentioned that you have reported this on the SDK team, but you haven't got a reply, if you can let us know how or where you reported this issue, I could look into this issue.

I hope this helps,

Marilu

Steve McD

unread,
May 25, 2017, 12:09:44 PM5/25/17
to gce-discussion
Hi, the thread for SDK team is https://issuetracker.google.com/issues/38383866

Basically they helped me re-install the SDK but could not help with the start-up scripts. I still think that something in the apt-get purge or apt-get delete removed the scripts, maybe something to do with dependencies, but I'm guessing.


On Thursday, May 25, 2017 at 8:56:41 AM UTC-4, Steven McDonald wrote:

Steve McD

unread,
May 25, 2017, 5:46:02 PM5/25/17
to gce-discussion
Ok found the problem I think
Cloned the VM and did some testing.

sudo apt-get remove google-cloud-sdk DOES remove start-up scripts. This is a bad bug. See the third last line.

mcd_steven@prod-copy-12-may:~$ sudo apt-get remove google-cloud-sdk
  • Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      gce-daemon libopts25 linux-headers-4.4.0-72 linux-headers-4.4.0-72-generic linux-image-4.4.0-72-generic ntp python-boto python-chardet python-crcmod
      python-google-compute-engine python-requests python-six python-urllib3 snap-confine
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
      gce-cloud-config gce-startup-scripts google-cloud-sdk
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 91.5 MB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 122875 files and directories currently installed.)
    Removing gce-cloud-config (1.3.3-0ubuntu6~16.04.0) ...
    Removing 'diversion of /usr/lib/cloud-init/write-ssh-key-fingerprints to /usr/lib/cloud-init/write-ssh-key-fingerprints.real-gce-cloud-config by gce-cloud-config'
    Leaving /etc/ntp.conf in place as configuration file
    Removing 'diversion of /etc/ntp.conf to /etc/ntp.conf.real-gce-cloud-config by gce-cloud-config'
    Removing 'diversion of /usr/share/google/regenerate-host-keys to /usr/share/google/regenerate-host-keys.real-gce-cloud-config by gce-cloud-config'
    Removing 'diversion of /usr/share/google/set-hostname to /usr/share/google/set-hostname.real-gce-cloud-config by gce-cloud-config'
    Removing gce-startup-scripts (1.3.3-0ubuntu6~16.04.0) ...
    Removing google-cloud-sdk (154.0.0-0ubuntu1~16.04.0) ...
    Processing triggers for man-db (2.7.5-1) ..
  • Is it now just a simple matter of sudo apt-get install gce-cloud-config gce-daemon gce-startup-scripts

On Thursday, May 25, 2017 at 8:56:41 AM UTC-4, Steven McDonald wrote:

Marilu (Cloud Platform Support)

unread,
May 26, 2017, 2:05:04 PM5/26/17
to gce-discussion
Hello Steven,

I tested the command on a GCE instance with source image 'ubuntu-1404-trusty-v20170517' and I was not able to reproduce, this is the output that I got:

sudo apt-get remove google-cloud-sdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  google-cloud-sdk
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 52.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 38713 files and directories currently installed.)
Removing google-cloud-sdk (140.0.0-0ubuntu1~14.04) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

After removing the Cloud SDK, I also verified and the Google's scripts are still running:
ps aux | grep google
root      1299  0.0  0.3  49440 14156 ?        Ss   17:44   0:00 /usr/bin/python /usr/bin/google_clock_skew_daemon
root      1300  0.0  0.3  49360 14224 ?        Ss   17:44   0:00 /usr/bin/python /usr/bin/google_ip_forwarding_daemon
root      1301  0.0  0.3  52108 14784 ?        Ss   17:44   0:00 /usr/bin/python /usr/bin/google_accounts_daemon

Can you let me know which image is using your Ubuntu instance? The command 'gcloud compute disks describe <disk-name> --zone <disk-zone> | grep sourceImage' will provide it.

Marilu
Message has been deleted

Marilu (Cloud Platform Support)

unread,
May 29, 2017, 10:41:13 AM5/29/17
to gce-dis...@googlegroups.com
I did a second test on an instance with image 'ubuntu-1604-xenial-v20170516' and I had no issues when removing the Google Cloud SDK, also the Google startup scripts were still running after removing the Cloud SDK.

Here is the info on the new Ubuntu instance that I created:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

You mentioned that 'grep returns nothing' is it possible that your snapshot source doesn't have the Google start up scripts as they might have been removed before taking the snapshot? 

Certainly, on my test when removing the Cloud SDK, it is not removing the packages 'gce-cloud-config gce-startup-scripts' as it does for you. If you can provide the steps to reproduce this issue, I'll suggest opening a public issue tracker, so we can further investigate.

Regarding your previous post, I noticed that in the output of the command, your project ID is listed; just keep in mind that this forum is public, so if you rather, you can edit your post and remove the project ID.

Sincerely,

Marilu 


On Friday, May 26, 2017 at 4:20:36 PM UTC-4, Steven McDonald wrote:
Hi, these system were created from snapshots so the grep returns nothing. They are all based on the standard Ubuntu 1604 image.
they are stock standard, nothing changed but apt-get upgrades

Very interesting your apt-get delete google-cloud-sdk only removed SDK ( as it should ) Could be a dependency issue in Ubuntu 1604 ??

mcd_steven@stage2:/usr/lib$ sudo gcloud compute disks describe stage2 --zone us-east1-d 
creationTimestamp: '2016-09-28T21:56:44.172-07:00'
id: 'xxxxxxxxx'
kind: compute#disk
lastAttachTimestamp: '2016-09-28T21:57:42.049-07:00'
licenses:
- https://www.googleapis.com/compute/v1/projects/../global/licenses/ubuntu-1604-xenial
name: stage2
selfLink: https://www.googleapis.com/compute/v1/projects/.../zones/us-east1-d/disks/stage2
sizeGb: '80'
sourceSnapshot: https://www.googleapis.com/compute/v1/projects/.../global/snapshots/xxxxxxxxxxx
sourceSnapshotId: 'xxxxxxxx'
status: READY
type: https://www.googleapis.com/compute/v1/projects/.../zones/us-east1-d/diskTypes/pd-standard
users:
- https://www.googleapis.com/compute/v1/projects/...zones/us-east1-d/instances/stage2
zone: https://www.googleapis.com/compute/v1/projects/...zones/us-east1-d



On Thursday, May 25, 2017 at 8:56:41 AM UTC-4, Steven McDonald wrote:
Reply all
Reply to author
Forward
0 new messages