Skip to content

Commit

Permalink
Fixed "Installed (but unpackaged) file(s) found:/opt/google-cloud-ops…
Browse files Browse the repository at this point in the history
…-agent/libexec/google_cloud_ops_agent_uap_plugin"
  • Loading branch information
XuechunHou committed Dec 2, 2024
1 parent 34cb619 commit 92d4e0a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
1 change: 1 addition & 0 deletions pkg/rpm/google-cloud-ops-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ BUILD_DISTRO=${build_distro#.} DESTDIR="%{buildroot}" ./build.sh
%{_prefix}/libexec/google_cloud_ops_agent_engine
%{_prefix}/libexec/google_cloud_ops_agent_diagnostics
%{_prefix}/libexec/google_cloud_ops_agent_wrapper
%{_prefix}/libexec/google_cloud_ops_agent_uap_plugin
%{_unitdir}/%{name}*
%{_unitdir}-preset/*-%{name}*

Expand Down
4 changes: 2 additions & 2 deletions systemd/google-cloud-ops-agent-diagnostics.service
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ After=network-online.target
[Service]
Type=simple
# Run diagnostics
ExecStart=@PREFIX@/libexec/wrong-path -config @SYSCONFDIR@/google-cloud-ops-agent/config.yaml
Restart=no
ExecStart=@PREFIX@/libexec/google_cloud_ops_agent_diagnostics -config @SYSCONFDIR@/google-cloud-ops-agent/config.yaml
Restart=always

[Install]
WantedBy=multi-user.target
8 changes: 4 additions & 4 deletions systemd/google-cloud-ops-agent-fluent-bit.service
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RuntimeDirectory=google-cloud-ops-agent-fluent-bit
StateDirectory=google-cloud-ops-agent/fluent-bit
LogsDirectory=google-cloud-ops-agent
Type=simple
ExecStartPre=@PREFIX@/libexec/wrong-path -service=fluentbit -in @SYSCONFDIR@/google-cloud-ops-agent/config.yaml -logs ${LOGS_DIRECTORY} -state ${STATE_DIRECTORY}
ExecStart=@PREFIX@/libexec/wrong-path -config_path @SYSCONFDIR@/google-cloud-ops-agent/config.yaml -log_path ${LOGS_DIRECTORY}/subagents/logging-module.log @PREFIX@/subagents/fluent-bit/bin/fluent-bit --config ${RUNTIME_DIRECTORY}/fluent_bit_main.conf --parser ${RUNTIME_DIRECTORY}/fluent_bit_parser.conf --storage_path ${STATE_DIRECTORY}/buffers
Restart=no
ExecStartPre=@PREFIX@/libexec/google_cloud_ops_agent_engine -service=fluentbit -in @SYSCONFDIR@/google-cloud-ops-agent/config.yaml -logs ${LOGS_DIRECTORY} -state ${STATE_DIRECTORY}
ExecStart=@PREFIX@/libexec/google_cloud_ops_agent_wrapper -config_path @SYSCONFDIR@/google-cloud-ops-agent/config.yaml -log_path ${LOGS_DIRECTORY}/subagents/logging-module.log @PREFIX@/subagents/fluent-bit/bin/fluent-bit --config ${RUNTIME_DIRECTORY}/fluent_bit_main.conf --parser ${RUNTIME_DIRECTORY}/fluent_bit_parser.conf --storage_path ${STATE_DIRECTORY}/buffers
Restart=always
# For debugging:
RuntimeDirectoryPreserve=yes
RuntimeDirectoryPreserve=yes
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RuntimeDirectory=google-cloud-ops-agent-opentelemetry-collector
StateDirectory=google-cloud-ops-agent/opentelemetry-collector
LogsDirectory=google-cloud-ops-agent
Type=simple
ExecStartPre=@PREFIX@/libexec/wrong-path -service=otel -in @SYSCONFDIR@/google-cloud-ops-agent/config.yaml -logs ${LOGS_DIRECTORY}
ExecStart=@PREFIX@/subagents/wrong-path --config=${RUNTIME_DIRECTORY}/otel.yaml
Restart=no
ExecStartPre=@PREFIX@/libexec/google_cloud_ops_agent_engine -service=otel -in @SYSCONFDIR@/google-cloud-ops-agent/config.yaml -logs ${LOGS_DIRECTORY}
ExecStart=@PREFIX@/subagents/opentelemetry-collector/otelopscol --config=${RUNTIME_DIRECTORY}/otel.yaml
Restart=always
# For debugging:
RuntimeDirectoryPreserve=yes
RuntimeDirectoryPreserve=yes
8 changes: 3 additions & 5 deletions systemd/google-cloud-ops-agent.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
Type=simple
# Validate the config.
ExecStartPre=@PREFIX@/libexec/google_cloud_ops_agent_uap_plugin -address 0.0.0.0 -errorlogfile errorlog.txt -protocol tcp
ExecStart=/bin/true
RemainAfterExit=yes
ExecStart=/opt/google-cloud-ops-agent/libexec/google_cloud_ops_agent_uap_plugin -address 0.0.0.0 -errorlogfile errorlog.txt -protocol tcp

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

0 comments on commit 92d4e0a

Please sign in to comment.