Skip to content
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

Add support for NFS-friendly log protocol. #1549

Merged
merged 1 commit into from
Jan 5, 2018
Merged

Add support for NFS-friendly log protocol. #1549

merged 1 commit into from
Jan 5, 2018

Conversation

klizhentas
Copy link
Contributor

@klizhentas klizhentas commented Jan 4, 2018

Fixes #1549

  • Session events are delivered in continuous
    batches in a guaranteed order with every event
    and print event ordered from session start.

  • Each auth server writes to a separate folder
    on disk to make sure that no two processes write
    to the same file at a time.

  • When retrieving sessions, auth servers fetch
    and merge results recorded by each auth server.

  • Migrations and compatibility modes are in place
    for older clients not aware of the new format,
    but compatibility mode is not NFS friendly.

  • On disk migrations are launched automatically
    during auth server upgrades.

@klizhentas klizhentas requested review from kontsevoy, russjones and a-palchikov and removed request for kontsevoy January 4, 2018 21:39
@klizhentas klizhentas force-pushed the sasha/nfs2 branch 3 times, most recently from 1c7ce85 to 068d0a3 Compare January 4, 2018 22:47
@klizhentas
Copy link
Contributor Author

retest this please

@klizhentas klizhentas force-pushed the sasha/nfs2 branch 4 times, most recently from abc02a1 to 435d2fa Compare January 4, 2018 23:40

The main log files are saved as:

/var/lib/teleport/log/<aut-server-id>/<date>.log
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix the typo


Server a1 will produce the following file:

/var/lib/teleport/a1/s1.index
Copy link
Contributor Author

Choose a reason for hiding this comment

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

duplicate sentence

{"file_name":"s1-3.events","type":"events","index":3}
{"file_name":"s1-40.chunks","type":"chunks","offset":40}

Events file /var/lib/teleport/a1/s1-4.events will contain:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

a2


// GetSessionChunk returns a reader which console and web clients request
Copy link
Contributor Author

Choose a reason for hiding this comment

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

delete this code

@@ -451,6 +852,7 @@ func (l *AuditLog) findInFile(fn string, query url.Values) ([]EventFields, error
}
for i := range eventFilter {
if ef.GetString(EventType) == eventFilter[i] {
fmt.Printf("%v has matched %v in filter %v and event %v\n", ef.GetString(EventType), ef, eventFilter[i], eventFilter)
Copy link
Contributor

Choose a reason for hiding this comment

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

log.Debugf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, debugging jenkins problems

@klizhentas
Copy link
Contributor Author

retest this please

@klizhentas klizhentas force-pushed the sasha/nfs2 branch 2 times, most recently from 4eb76fc to 30a4974 Compare January 5, 2018 02:46
* Session events are delivered in continuous
batches in a guaranteed order with every event
and print event ordered from session start.

* Each auth server writes to a separate folder
on disk to make sure that no two processes write
to the same file at a time.

* When retrieving sessions, auth servers fetch
and merge results recorded by each auth server.

* Migrations and compatibility modes are in place
for older clients not aware of the new format,
but compatibility mode is not NFS friendly.

* On disk migrations are launched automatically
during auth server upgrades.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants