Bug 1926331 - systemd presets request - google-guest-agent.service google-startup-scripts.service google-shutdown-scripts.service
Summary: systemd presets request - google-guest-agent.service google-startup-scripts.s...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-release
Version: 34
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mohan Boddu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1925322
TreeView+ depends on / blocked
 
Reported: 2021-02-08 16:30 UTC by ericedens
Modified: 2021-03-05 18:55 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-05 18:55:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description ericedens 2021-02-08 16:30:56 UTC
* Does the service require post-rpm-installation configuration in order to be useful (for example, does it need manual edits to a configuration file)?

 - No modifications are required after installation to be useful.

* Does the service listen on a network socket for connections originating on a separate physical or virtual machine?

 - The services don't listen on external network sockets.

* Is the service non-persistent (i.e. run once at startup and exit)?

 - google-guest-agent.service: Persistent with restart
    - https://github.com/GoogleCloudPlatform/guest-agent/blob/master/google-guest-agent.service
 - google-startup-scripts.service: Runs once at startup
    - https://github.com/GoogleCloudPlatform/guest-agent/blob/master/google-startup-scripts.service
 - google-shutdown-scripts.service: Runs once at startup
    - https://github.com/GoogleCloudPlatform/guest-agent/blob/master/google-shutdown-scripts.service

* What is the exact name (or names) of the systemd unit files to be enabled?

google-guest-agent.service
google-startup-scripts.service
google-shutdown-scripts.service

* Is this request for all Fedora deliverables or only for some Editions (list them)?

All deliverables.

Comment 1 ericedens 2021-02-08 16:57:07 UTC
Please include for F33 and F34. Thanks!

Comment 2 Stephen Gallagher 2021-02-09 13:53:16 UTC
Is Google Cloud guest agent packaged in Fedora? I cannot find it.

Do these services gracefully exit (without being marked as failed) in the event that they are not being started on a Google Cloud instance?


Also, please review https://docs.fedoraproject.org/en-US/packaging-guidelines/DefaultServices/#_hardware_support_services

Comment 3 Ben Cotton 2021-02-09 16:24:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 4 ericedens 2021-02-09 18:39:53 UTC
> Is Google Cloud guest agent packaged in Fedora?

It's under review here: Bug 1925322

> Do these services gracefully exit (without being marked as failed) in the event that they are not being started on a Google Cloud instance?

If started on an instance that is not running on Google Cloud, the services will continue running and wait for the metadata server [1] to become available. (They will not exit with an error.)

1. https://cloud.google.com/compute/docs/storing-retrieving-metadata

Comment 5 Stephen Gallagher 2021-02-09 20:30:42 UTC
(In reply to ericedens from comment #4)
> If started on an instance that is not running on Google Cloud, the services
> will continue running and wait for the metadata server [1] to become
> available. (They will not exit with an error.)
> 
> 1. https://cloud.google.com/compute/docs/storing-retrieving-metadata

So the service will attempt to communicate with a service on the network, originating from the guest machine and receiving configuration from that remote source?

Comment 6 ericedens 2021-02-10 02:00:10 UTC
> So the service will attempt to communicate with a service on the network, originating from the guest machine and receiving configuration from that remote source?

That's right. (It doesn't open a socket to receive the configuration)

Comment 7 ericedens 2021-02-12 21:03:29 UTC
Anything else that we need? Or is it a matter of waiting for bug 1925322 to finish?

Comment 8 Stephen Gallagher 2021-02-18 12:39:42 UTC
I opened a ticket for a FESCo vote: https://pagure.io/fesco/issue/2578

Comment 9 Neal Gompa 2021-02-18 12:54:55 UTC
(In reply to ericedens from comment #6)
> > So the service will attempt to communicate with a service on the network, originating from the guest machine and receiving configuration from that remote source?
> 
> That's right. (It doesn't open a socket to receive the configuration)

What's the reason why it persistently stays open like this if it can't get configuration? My understanding is that usually these things quit if they can't get metadata information. Also, why does it work this way as opposed to receiving metadata via an extra device or something (like how cloud-init or ignition do)?

Comment 10 ericedens 2021-02-18 20:07:22 UTC
Good questions!

> why does it work this way as opposed to receiving metadata via an extra device or something (like how cloud-init or ignition do)?

Some providers use special devices to expose metadata. A downside of this approach: The instance is functionally locked to the provider's environment. Consider network configuration: If the VM boots outside of the provider's environment, then its agent will be unable to find the device, and the network will be unavailable.

In contrast, on Google Compute Engine, VMs boot with KVM, and the network configuration is managed by DHCP. If the guest agent is installed, the instance will receive enhancements and features. If the machine boots outside GCE, it's still functional (it will just lack the features provided by the agent).

> What's the reason why it persistently stays open like this if it can't get configuration?

It's a design decision that's intended to increase reliability. That said, I'm not familiar with other agents regarding their behavior.

Comment 11 ericedens 2021-02-26 16:56:08 UTC
Hi! I see the FESCo vote passed;  anything else we need?

https://pagure.io/fesco/issue/2578

Comment 12 Stephen Gallagher 2021-03-01 16:58:59 UTC
(In reply to ericedens from comment #11)
> Hi! I see the FESCo vote passed;  anything else we need?
> 
> https://pagure.io/fesco/issue/2578

https://src.fedoraproject.org/rpms/fedora-release/pull-request/174
https://src.fedoraproject.org/rpms/fedora-release/pull-request/175


Note You need to log in before you can comment on or make changes to this bug.