Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

tarmak clusters logs fails to parse timestamp #761

Open
dippynark opened this issue Mar 6, 2019 · 1 comment
Open

tarmak clusters logs fails to parse timestamp #761

dippynark opened this issue Mar 6, 2019 · 1 comment
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@dippynark
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened: Ran date --date='24 hours ago' (the default for the since flag) on a Linux machine (that command doesn't work on OS X) to get 'Tue Mar 5 10:51:10 UTC 2019' then ran the following on OS X:

$ tarmak clusters logs bastion vault etcd worker master control-plane --since 'Tue Mar  5 10:51:10 UTC 2019'
INFO[0000] fetching logs from targets [bastion vault etcd worker master control-plane]  app=tarmak
INFO[0001] fetching from host bastion                    app=tarmak
INFO[0001] fetching from host vault-3                    app=tarmak
INFO[0001] fetching from host vault-2                    app=tarmak
INFO[0001] fetching from host vault-1                    app=tarmak
INFO[0001] fetching from host etcd-3                     app=tarmak
INFO[0001] fetching from host etcd-1                     app=tarmak
INFO[0001] fetching from host etcd-2                     app=tarmak
INFO[0001] fetching from host worker-1                   app=tarmak
INFO[0001] fetching from host worker-2                   app=tarmak
INFO[0001] fetching from host worker-3                   app=tarmak
INFO[0001] fetching from host master                     app=tarmak
INFO[0001] new connection to bastion host successful     app=tarmak
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
Failed to parse timestamp: Tue Mar  5 10:51:10 UTC 2019
ERRO[0003] tarmak exited with an error: 11 errors occurred:
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1
	* command [journalctl -o json --no-pager --since 'Tue Mar  5 10:51:10 UTC 2019' --until '2019-03-06 10:53:22'] returned non-zero: 1

What you expected to happen: The since flag to work on OS X

How to reproduce it (as minimally and precisely as possible): as above

Environment:

  • Kubernetes version (use kubectl version): 1.12.5
  • Tarmak version: 0.6.1
@jetstack-bot jetstack-bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 6, 2019
@simonswine
Copy link
Contributor

I think the correct input should be:

2019-03-05 10:51:10

Where is the 24 hours ago coming from?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants