Skip to content

Commit

Permalink
output the watches first (#869)
Browse files Browse the repository at this point in the history
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
  • Loading branch information
rberrelleza committed May 7, 2020
1 parent d660a01 commit 5ff6d35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ func (up *UpContext) cleanCommand() {
in := strings.NewReader("\n")
var out bytes.Buffer

cmd := "([ -f '/var/okteto/bin/clean' ] && /var/okteto/bin/clean || (cp /var/okteto/bin/* /usr/local/bin; ps -ef | grep -v -E '/var/okteto/bin/syncthing|/var/okteto/bin/remote|PPID' | awk '{print $2}' | xargs -r kill -9)) >/dev/null 2>&1; cat /proc/sys/fs/inotify/max_user_watches"
cmd := "cat /proc/sys/fs/inotify/max_user_watches; ([ -f '/var/okteto/bin/clean' ] && /var/okteto/bin/clean || (cp /var/okteto/bin/* /usr/local/bin; ps -ef | grep -v -E '/var/okteto/bin/syncthing|/var/okteto/bin/remote|PPID' | awk '{print $2}' | xargs -r kill -9)) >/dev/null 2>&1;"

err := exec.Exec(
up.Context,
Expand All @@ -799,6 +799,7 @@ func (up *UpContext) cleanCommand() {
log.Infof("failed to clean session: %s", err)
}

log.Infof("watches: %s", out.String())
if utils.IsWatchesConfigurationTooLow(out.String()) {
log.Yellow("\nThe value of /proc/sys/fs/inotify/max_user_watches in your cluster nodes is too low.")
log.Yellow("This can affect Okteto's file synchronization performance.")
Expand Down

0 comments on commit 5ff6d35

Please sign in to comment.