Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Initial push #1

Merged
merged 22 commits into from
Nov 16, 2017
Merged

Initial push #1

merged 22 commits into from
Nov 16, 2017

Conversation

sameo
Copy link

@sameo sameo commented Nov 15, 2017

Mostly a refactor of the @clearcontainers/proxy KSM code, with:

  • Initial gRPC protocol defined
  • gRPC service implemented

TODO

  • Unit tests
  • Travis CI
  • Coveralls support
  • Client API
  • Simple kicker implementation
  • Virtcontainers input client
  • Vendoring
  • Badges
  • Pullapprove
  • Add README.md
  • Systemd service

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

As an initial import, lgtm
Minor queries, and obviously we'll grow docs and build/install instr etc.


import "google/protobuf/empty.proto";

// To generate hyperstart.pb.go, run:
Copy link
Contributor

Choose a reason for hiding this comment

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

hyperstart.pb.go? - presume that should be ksm.pb.go ?

@@ -0,0 +1,14 @@
syntax = "proto3";

package ksm;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: early days - but I presume we will add a high level description in here.
I only notice as I think there is a place in ksm.pb.go where it would be copied to on generation.

@@ -0,0 +1,481 @@
//
// Copyright (c) 2017 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

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

A thought, as this is effectively a new project - maybe we should start to use the SPDX copyright commenting method rather than the full blown long winded one?
https://spdx.org/licenses/
https://patchwork.kernel.org/patch/10016189/

It is becoming more common and accepted.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@sameo sameo force-pushed the topic/initial-push branch from bdaacd2 to 1f6c0c1 Compare November 15, 2017 14:08
Samuel Ortiz added 5 commits November 15, 2017 15:17
Only Kick for now.

Signed-off-by: Samuel Ortiz <[email protected]>
Mostly copy pasted from clearcontainers/proxy

Signed-off-by: Samuel Ortiz <[email protected]>
The throttler creates the gRPC service on a UNIX socket,
and kicks the KSM throttling routine when receiving the Kick
command.

Signed-off-by: Samuel Ortiz <[email protected]>
With locked revisions.

Signed-off-by: Samuel Ortiz <[email protected]>
@sameo sameo force-pushed the topic/initial-push branch from 1f6c0c1 to 05d2b5a Compare November 15, 2017 14:26
Samuel Ortiz added 3 commits November 15, 2017 15:29
Again, copied from the original proxy KSM throttling implemenation.

Signed-off-by: Samuel Ortiz <[email protected]>
@coveralls
Copy link

coveralls commented Nov 15, 2017

Coverage Status

Changes Unknown when pulling a8ba9e3 on sameo:topic/initial-push into ** on kata-containers:master**.

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

lgtm.

.ci/go-lint.sh Outdated
# limitations under the License.
#

#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is redundant as it's isn't the first - same comment applies to go-test.sh.

go_import_path: github.com/kata-containers/ksm-throttler

before_install:
- go get github.com/mattn/goveralls
Copy link
Contributor

Choose a reason for hiding this comment

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

Just an idea, but how about trying out codecov.io instead? clearcontainers/jenkins#28 Or we could run both and see how they compare?

Copy link
Author

Choose a reason for hiding this comment

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

Added

Samuel Ortiz added 5 commits November 16, 2017 10:41
For now it is just a wrapper around the Kick gRPC method.

Signed-off-by: Samuel Ortiz <[email protected]>
kicker only sends a Kick() call and returns.

Signed-off-by: Samuel Ortiz <[email protected]>
Let's give it a try.

Signed-off-by: Samuel Ortiz <[email protected]>
throttler.go:143: arg logLevel for printf verb %s of wrong type: *string

Signed-off-by: Samuel Ortiz <[email protected]>
@codecov
Copy link

codecov bot commented Nov 16, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@fea7374). Click here to learn what that means.
The diff coverage is 47.16%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #1   +/-   ##
=========================================
  Coverage          ?   47.16%           
=========================================
  Files             ?        2           
  Lines             ?      405           
  Branches          ?        0           
=========================================
  Hits              ?      191           
  Misses            ?      175           
  Partials          ?       39
Impacted Files Coverage Δ
ksm.go 59.1% <59.1%> (ø)
throttler.go 6.52% <6.52%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fea7374...a4008f2. Read the comment docs.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 90dece9 on sameo:topic/initial-push into ** on kata-containers:master**.

2 similar comments
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 90dece9 on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 90dece9 on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

coveralls commented Nov 16, 2017

Coverage Status

Changes Unknown when pulling d86c1cf on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8e8d3b7 on sameo:topic/initial-push into ** on kata-containers:master**.

1 similar comment
@coveralls
Copy link

coveralls commented Nov 16, 2017

Coverage Status

Changes Unknown when pulling 8e8d3b7 on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6ea86f1 on sameo:topic/initial-push into ** on kata-containers:master**.

1 similar comment
@coveralls
Copy link

coveralls commented Nov 16, 2017

Coverage Status

Changes Unknown when pulling 6ea86f1 on sameo:topic/initial-push into ** on kata-containers:master**.

@sameo sameo force-pushed the topic/initial-push branch 4 times, most recently from dd1357c to 692db52 Compare November 16, 2017 16:46
@sameo sameo changed the title [WIP] Initial push Initial push Nov 16, 2017
.ci/setup.sh Outdated
set -e

cidir=$(dirname "$0")
tests_repo="github.com/clearcontainers/tests"
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably this is just a temporary URL until we populate https://github.com/kata-containers/tests?

title_regex: 'WIP'
labels:
- do-not-merge
- wip
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: I've just added these labels.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks.

@@ -0,0 +1,122 @@
VERSION := 0.1+

PACKAGE = github.com/kata-containers/ksm-throttler
Copy link
Contributor

Choose a reason for hiding this comment

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

The github URL is used in a lot of places. It's not a blocker for this PR of course, but I wonder if we could standardise on something like .ci/self-url that container this string and then have the Makefile read that file. make can then generate the value used in ksm-throttler.service.in, and so on.

@sameo sameo force-pushed the topic/initial-push branch from 692db52 to 8f30bc1 Compare November 16, 2017 18:09
We don't need it for now.

Signed-off-by: Samuel Ortiz <[email protected]>
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8f30bc1 on sameo:topic/initial-push into ** on kata-containers:master**.

2 similar comments
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8f30bc1 on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8f30bc1 on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

coveralls commented Nov 16, 2017

Coverage Status

Changes Unknown when pulling b79782c on sameo:topic/initial-push into ** on kata-containers:master**.

@@ -0,0 +1,46 @@
# Copyright (c) 2017 Intel Corporation
Copy link

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 that ?

@sboeuf
Copy link

sboeuf commented Nov 16, 2017

@sameo that's a nice and huge first commit ! Even if there are some flaws (I am not saying there are some :) ), we can manage this later in follow up pull requests.
LGTM

@sameo
Copy link
Author

sameo commented Nov 16, 2017

This is complete now.

@sameo sameo force-pushed the topic/initial-push branch from f446d8d to a4008f2 Compare November 16, 2017 19:08
@coveralls
Copy link

coveralls commented Nov 16, 2017

Coverage Status

Changes Unknown when pulling f446d8d on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a4008f2 on sameo:topic/initial-push into ** on kata-containers:master**.

2 similar comments
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a4008f2 on sameo:topic/initial-push into ** on kata-containers:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a4008f2 on sameo:topic/initial-push into ** on kata-containers:master**.

@sboeuf
Copy link

sboeuf commented Nov 16, 2017

@sameo you're gonna have to approve your own PR since it introduces the proxy team as approvers too.

@sameo
Copy link
Author

sameo commented Nov 16, 2017

LGTM

@sameo sameo merged commit 74cca56 into kata-containers:master Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants