-
Notifications
You must be signed in to change notification settings - Fork 294
(SDI-2199) Fix #1344 binary change to snaptel/snapteld #1357
Conversation
@@ -109,7 +109,7 @@ const ( | |||
defaultLogPath string = "" | |||
defaultLogTruncate bool = false | |||
defaultLogColors bool = true | |||
defaultConfigPath string = "/etc/snap/snapd.conf" | |||
defaultConfigPath string = "/etc/snap/snapteld.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a note to symlink this as well in the packaging since this will be a breaking upgrade.
ea33005
to
e07a429
Compare
@@ -121,24 +121,22 @@ Tarball (choose the appropriate version and platform): | |||
``` | |||
$ curl -sfLO https://github.com/intelsdi-x/snap/releases/download/0.18.0/snap-0.18.0-linux-amd64.tar.gz | |||
$ tar xf snap-0.18.0-linux-amd64.tar.gz | |||
$ cp snapd /usr/local/bin | |||
$ cp snapctl /usr/local/bin | |||
$ cp snapteld /usr/local/sbin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to put snapteld and snaptel in separate locations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, same as /usr/sbin/sshd
and /usr/bin/ssh
.
``` | ||
|
||
Ubuntu 16.04.1 [snapd package version 2.13+](https://launchpad.net/ubuntu/+source/snapd) installs snapd/snapctl binary in /usr/bin. These executables are not related to snap-telemetry. Running `snapctl` from snapd package will result in the following error message: | ||
If you installed snap-telemetry package, please make sure `/usr/local/bin:/usr/local/sbin` is part of your $PATH and has higher priority than `/usr/bin:/usr/sbin`, or invoke the snap-telemetry snapteld/snaptel binary using fully qualified path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this referring to older versions only? Versions post-name change should be fine regardless of where /usr/local/(s)bin is in the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be dropped with the new binary name so I'll remove it.
@@ -157,15 +155,15 @@ $ systemctl start snap-telemetry | |||
If you installed Snap from binary, you can start Snap daemon via the command: | |||
``` | |||
$ sudo mkdir -p /var/log/snap | |||
$ sudo snapd --plugin-trust 0 --log-level 1 -o /var/log/snap & | |||
$ sudo snapteld --plugin-trust 0 --log-level 1 -o /var/log/snap & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the -o
to --log-path
to match the other self-explanatory options?
|
||
snapd supports being configured through a configuration file located at a default location of `/etc/snap/snapd.conf` on Linux systems or by passing a configuration file in through the `--config` command line flag when starting snapd. YAML and JSON are currently supported for configuration file types. | ||
snapteld supports being configured through a configuration file located at a default location of `/etc/snap/snapteld.conf` on Linux systems or by passing a configuration file in through the `--config` command line flag when starting snapteld. YAML and JSON are currently supported for configuration file types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the config file location going to stay as /etc/snap/
vs /etc/snaptel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can keep it /etc/snap since there's no conflicts. This will allow keyrings file to be kept in same location as well.
@@ -438,7 +438,7 @@ func action(ctx *cli.Context) error { | |||
log.WithFields( | |||
log.Fields{ | |||
"block": "main", | |||
"_module": "snapd", | |||
"_module": "snapteld", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing these all from snapd->snapteld, would it make sense to just instantiate a logger with the module set in one place? Or at least use a moduleName var?
@@ -17,11 +17,11 @@ See the License for the specific language governing permissions and | |||
limitations under the License. | |||
--> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to keep this name for this file? What about docs/DAEMON_CONFIGURATION.md
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to defer any documentation link changes to SDI-2203. The goal for this PR is to fix the snaptel/snapteld binary, and have the installation steps match the new package location (sbin/bin).
If we have any documentation touch ups, they can be done post 0.19.0 release.
I guess the GLOSSARY.md has to be updated too now it's merged. |
Correct @kindermoumoute - whatever naming we choose for the file will need replacement in the glossary as well. |
Once this is finalized, I'll squash it into one commit before merging. We plan to merge this on Monday before the 0.19.0 release. |
``` | ||
|
||
Ubuntu 16.04.1 [snapd package version 2.13+](https://launchpad.net/ubuntu/+source/snapd) installs snapd/snapctl binary in /usr/bin. These executables are not related to snap-telemetry. Running `snapctl` from snapd package will result in the following error message: | ||
NOTE: snap-telemetry packages prior to 0.19.0 installed `/usr/local/bin/{snapctl|snapd}` and these binaries have been renamed to `snaptel` and `snapteld`. snap-telemetry packages prior to 0.18.0 symlinked `/usr/bin/{snapctl|snapd}` to `/opt/snap/bin/{snapctl|snapd}` and may cause conflicts with [Ubuntu's `snapteld` package](http://packages.ubuntu.com/xenial-updates/snapd). Ubuntu 16.04.1 [snapteld package version 2.13+](https://launchpad.net/ubuntu/+source/snapd) installs snapd/snapctl binary in /usr/bin. These executables are not related to snap-telemetry. Running `snapctl` from snapd package will result in the following error message: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and may cause conflicts with [Ubuntu's >>>>>
snapteld<<< package]
>>>snapteld<<< package version 2.13+
|
||
``` | ||
$ snapctl | ||
error: snapctl requires SNAP_CONTEXT environment variable | ||
error: snaptel requires SNAP_CONTEXT environment variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this.
There is |
@lmroz found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.