Skip to content

Add /opt/stackdriver/stack-config for backward compatibility. #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: stackdriver-agent-5.5.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deb/debian/install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
debian/collectd.conf etc/stackdriver/
debian/stack-config opt/stackdriver/
3 changes: 2 additions & 1 deletion prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ if [[ "${PKGFORMAT-}" != "deb" && "${PKGFORMAT-}" != "rpm" ]]; then
echo >&2 "This script requires PKGFORMAT to be either 'deb' or 'rpm'"
exit 1
fi
cp collectd.conf "${PKGFORMAT}"
cp -p collectd.conf "${PKGFORMAT}"
cp -p stack-config "${PKGFORMAT}"
5 changes: 5 additions & 0 deletions rpm/stackdriver-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Source1: curl-%{curl_version}.tar.bz2
Source200: stackdriver-agent
Source201: collectd.conf
Source202: stackdriver.sysconfig
Source203: stack-config
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: python-devel
Expand Down Expand Up @@ -237,6 +238,7 @@ popd
%{__install} -Dp -m0755 %{SOURCE200} %{buildroot}/%{_initddir}/stackdriver-agent
%{__install} -Dp -m0644 %{SOURCE201} %{buildroot}/%{_confdir}/collectd.conf
%{__install} -Dp -m0644 %{SOURCE202} %{buildroot}/etc/sysconfig/stackdriver
%{__install} -Dp -m0755 %{SOURCE203} %{buildroot}/opt/stackdriver/stack-config

%{__install} -d -m0755 %{buildroot}/%{_datadir}/collectd/collection3/

Expand Down Expand Up @@ -365,6 +367,9 @@ fi
%{_initddir}/stackdriver-agent
%config(noreplace) /etc/sysconfig/stackdriver

# Backward compatibility.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add instructions here and in stack-config about when the stack-config file and these two lines can be deleted (if ever)? Thanks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may also be worthwhile to add comments in the other files for the stack-config lines.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe it can ever be removed, unless we want to break the old installation commands (using stack-config --write-gcm, which are embedded in lots of systems at this point). But it's empty, so what's the harm?

%dir /opt/stackdriver
/opt/stackdriver/stack-config

%changelog
* Mon Oct 16 2017 Stackdriver Agents <[email protected]> 5.5.2-372
Expand Down
3 changes: 3 additions & 0 deletions stack-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
# This file is intentionally left blank.
# It only exists for backward compatibility.