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

backport: 1.6.3 rel #1613

Merged
merged 15 commits into from
May 2, 2019
Merged

Conversation

ganeshmaharaj
Copy link
Contributor

Backporting the below patches for 1.6.3 release.

#1409
#1439
#1528
#1541
#1547
#1554
#1599
#1530

teawater and others added 15 commits April 30, 2019 11:15
Make VMCache and VM templating can work together.

Fixes: kata-containers#1376

Signed-off-by: Hui Zhu <[email protected]>
(cherry picked from commit 343a0d3)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
The "ephemeral" is just used to indicate ephemeral volumes in
runtime. We should not pass it to agent. Instead, "bind" should be
the correct mount type to be passed.

Fixes: kata-containers#1438

Signed-off-by: Xie Yongji <[email protected]>
(cherry picked from commit 2d422a8)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
So that shimv2 can convert it into grpc errors.

Signed-off-by: Peng Tao <[email protected]>
(cherry picked from commit cf90751)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
containerd checks for the grpc error code to determine
correct recover action upon grpc errors. We need to provide
them properly.

Unfortunately ttrpc doesn't support grpc interceptor so we have
to modify every service function for it.

Fixes: kata-containers#1527

Signed-off-by: Peng Tao <[email protected]>
(cherry picked from commit 8215a3c)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
So that caller can determine that it is ENOENT-alike error.

Signed-off-by: Peng Tao <[email protected]>
(cherry picked from commit f512542)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
GENERATED_FILES already includes COLLECT_SCRIPT, so there's no need to
specify it again:

  GENERATED_FILES += $(COLLECT_SCRIPT)
  ...
  clean:
    $(QUIET_CLEAN)rm -f ... $(GENERATED_FILES) $(COLLECT_SCRIPT)

Signed-off-by: Stefan Hajnoczi <[email protected]>
(cherry picked from commit b20fd9d)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
The netmon target must be rebuilt when the VERSION file changes since it
uses the value of VERSION on the build command-line.

Signed-off-by: Stefan Hajnoczi <[email protected]>
(cherry picked from commit bbf9253)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Depending on Makefile is not enough to detect all changes.  We must
rebuild when included makefiles change, too.

The MAKEFILE_LIST special variable contains the filenames of all
included makefiles and Makefile itself.

Signed-off-by: Stefan Hajnoczi <[email protected]>
(cherry picked from commit 1eb5d6c)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
When a parallel build is invoked using "make -j4" there is a race
between EXTRA_DEPS ('clean') and generating files:

  CPU1                             CPU2
  ----                             ----
  create cli/generated-config.go
                                   rm cli/generated-config.go
  go build -> error: generated-config.go doesn't exist!

Previous commits ensured that targets relying on version information
like VERSION and COMMIT declare appropriate dependencies.  Therefore
make is now able to detect changes and rebuild targets as needed.  It is
no longer necessary to abuse the clean target to force a rebuild.

Fixes: kata-containers#1540
Signed-off-by: Stefan Hajnoczi <[email protected]>
(cherry picked from commit 53ebe51)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Makefile had a template for cli/config-generated.go embedded inside it.
There is already a templating mechanism for .in files.  Using a .in file
is cleaner since it avoids make's awkward interaction with shell
escaping and line splitting.

This patch moves the template into cli/config-generated.go.in and reuses
the existing .in file templating mechanism.  Only the PKGRUNDIR variable
needs to be added.

Signed-off-by: Stefan Hajnoczi <[email protected]>
(cherry picked from commit 0f7bb25)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Makefile uses $(shell) to build a git commit string.  Unfortunately this
means make targets cannot be rebuilt when COMMIT changes value.  We need
to reflect this string value into files on which make can process
dependencies.

I stole a solution from QEMU's Makefile:
1. Print the string into .git-commit.tmp
2. If .git-commit.tmp differs from .git-commit, copy it to .git-commit
3. Depend on .git-commit from all targets that need $COMMIT

This way targets are only rebuilt if the commit string value actually
changes.

Signed-off-by: Stefan Hajnoczi <[email protected]>
(cherry picked from commit 7949cd6)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Add check if vm template is on before vm template initialize.

Fixes: kata-containers#1514

Signed-off-by: Hui Zhu <[email protected]>
(cherry picked from commit 76a5076)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Fix gofmt complain for virtcontainers/qemu_s390x.go

Fixes: kata-containers#1553

Signed-off-by: Alice Frosi <[email protected]>
(cherry picked from commit a013f9b)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
kata-runtime list command should list all valid container, not fail
when some containers information uncorrent, like rootfs not found.

Fixes: kata-containers#1592

Signed-off-by: Ace-Tang <[email protected]>
(cherry picked from commit b7f51be)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Don't set a default CPU constraint if period and quota are not specified, that
way the container will inherit the CPU constraint from its parent. Container
creation won't fail if the parent CPU constraint is smaller than the default
number of vCPUs.

fixes kata-containers#1521

Signed-off-by: Julio Montes <[email protected]>
(cherry picked from commit 59e3956)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
@ganeshmaharaj
Copy link
Contributor Author

/test

@ganeshmaharaj
Copy link
Contributor Author

centos-7-4-q-35

=== RUN   TestHostNetworkingRequested
--- FAIL: TestHostNetworkingRequested (0.01s)
    assertions.go:239: 
                          
	Error Trace:	network_test.go:98
        
	Error:      	Should be true
=== RUN   TestSetupNetworkNamespace

sles-12

=== RUN   TestNsEnterSuccessful
--- FAIL: TestNsEnterSuccessful (0.00s)
    assertions.go:239: 
                          
	Error Trace:	nsenter_test.go:210
        
	Error:      	Expected nil, but got: &errors.errorString{s:"failed to open target ns: failed to Statfs \"/proc/109136/ns/cgroup\": no such file or directory"}
        
	Messages:   	failed to open target ns: failed to Statfs "/proc/109136/ns/cgroup": no such file or directory
    assertions.go:239: 
                          
	Error Trace:	nsenter_test.go:240
        
	Error:      	Not equal: 
        
	            	expected: "cgroup"
        
	            	actual: "0"
    assertions.go:239: 
                          
	Error Trace:	nsenter_test.go:240
        
	Error:      	Not equal: 
        
	            	expected: "ipc:[4026533094]"
        
	            	actual: "0"
    assertions.go:239: 
                          
	Error Trace:	nsenter_test.go:240
        
	Error:      	Not equal: 
        
	            	expected: "net:[4026533097]"
        
	            	actual: "0"
    assertions.go:239: 
                          
	Error Trace:	nsenter_test.go:240
        
	Error:      	Not equal: 
        
	            	expected: "pid:[4026533095]"
        
	            	actual: "0"
    assertions.go:239: 
                          
	Error Trace:	nsenter_test.go:240
        
	Error:      	Not equal: 
        
	            	expected: "uts:[4026533093]"
        
	            	actual: "0"
FAIL

@jcvenegas
Copy link
Member

@GabyCT is a known issue ?

--- FAIL: TestHostNetworkingRequested (0.01s)
    assertions.go:239: 
                          
	Error Trace:	network_test.go:98
        
	Error:      	Should be true

for centos ?

@jodh-intel
Copy link
Contributor

@jcvenegas - yep, it's known - see #1604.

@jcvenegas
Copy link
Member

@jodh-intel thanks! So I will merge it in a few minutes, please let me know you are not agree to merge it for that faling CI job.

@jodh-intel @egernst @grahamwhaley

@jodh-intel
Copy link
Contributor

@jcvenegas - the centos failure can be ignored imho as we won't get it fixed today and it's not specific to this PR anyway.

@egernst egernst merged commit 071e26b into kata-containers:stable-1.6 May 2, 2019
@ganeshmaharaj ganeshmaharaj deleted the bp-1.6.3-rel branch July 17, 2019 17:00
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.

8 participants