Commit Graph

2214 Commits

Author SHA1 Message Date
Julio Montes
908a42a4af vendor: update logrus
latest agent version requires logrus v1.4.2

shortlog:
839c75f Release 1.4.2
744fc4c fix build break for plan9
f2849a8 add full cross compilation in travis (#963)
1bc909a Add a checkTerminal for nacl to support running on play.golang.org
1a601d2 remove go 1.10 from ci build matrix
5521996 Update x/sys/unix to fix AIX support
c1b6154 Fix solaris build
8bdbc7b Release 1.4.1
6c615e1 remove field if val is empty string for func and file field in text
        formatter
ede5b63 Make isTerminal un-exported
3e06420 Move files to main directory
38bc297 return new entry for Entry.WithContext
7d700cd Test more platforms
c49ef1d Move terminal package
5d8c3bf Updated travis.yml
41ee4dd Moved moved unix-related parts into terminal
7de3dd8 Removed golang.org/x/crypto refs
10ff0d0 Got rid of IsTerminal call to reduce external dependencies
c076594 Add Go 1.12 to Travis CI build matrix
02141df Add CHANGELOG for v1.4.0
68e41f6 Add WithContext
cf1b9fd fix sync.Once usage instead of adding a mutex lock
b9d4514 fix ReportCaller race condition
99a5172 Add and example for CallerPrettyfier
5c2b39a Remove debug trace
ffec2f2 Add a CallerPrettyfier callback to the text formatter
5e9b246 Add a CallerPrettyfier callback to the json formatter
4f5fd63 Fix infinite recursion on unknown Level.String()
c4e4882 prevent string formatting in Entry.Logf when log level is not enabled
774bb8e Fix error formatting based on best practices from Code Review Comments
4ea4861 Add a DeferExitHandler function
68a2b57 Add nested-logrus-formatter to README.md
f61e48b logger: fix wrong callback method
0f544bf Add a unit test to ensure hook are called in their registration order
a99ca47 Add an example hook which adds default fields
78fb385 Remove unused variables in TextFormatter
eef6b76 Update Changelog for 1.3.0
bd9534b Test Log
e8fd0ba Remove sensitivity to file line changes
ff695da Implement TextUnmarshaller interface for Level type
a6668e7 Add Generic Log functions with level via argument
9abefb9 do not clear error formatting informative field
d962013 respect ForceColor and environment variables over OS check
08e8d65 Skip func pointer type value in fields
0c5e33c Travis: fix checkout dir to help contributors run Travis on their fork
f1b98e4 ignore expected color on windows
e902658 Disable colored output on windows entirely
eab2c44 fix hook example
c7183bf fix missing parameter
2cafb78 fix race condition caused by writing to entry.Data, using the same
        technique as JSONFormatter
bcd833d v1.2.0 changelog
d10c2f9 fix panic in text formatter
5a78c38 make file name comparison os independant
d2654b7 add file and line number in output when report caller is enabled
fa01b53 move test functions and test utils functions in their own package
ec57031 store a runtime.Frame in Entry instead of the caller function name
975c406 Use a sync.Once to init the reportCaller data
5fcd19e add a SetReportCaller on Logger object
0c52582 Add GELF to third party formatters
5c1f2cd Make logrus.Level implement encoding.TextUnmarshaler
bb98c6c Fix the version of windows coloring library dependency
ed3ffa0 PR#844: Added Trace to TestLogLevelEnabled() (requested by @dgsb)
b54cafe Addresses @stevvooe's backward compatibility concerns.
ef9d84e Added trace log level.
c7a33dc Add Trace level logging
4981d81 Added TRACE level logging.
9c7692c disable colors on hook example
f2ab87f Add an example for tracing global variable with hook
ff92509 Attempt to fix build break on aix
a13c5db Fix typo in comment
4346c76 Remove unnecessary wrapper function on `os.Exit`
99bc300 Add a method Exit on Logger that calls `os.Exit` or alternate exit
        function.
ad15b42 Update changelog for v1.1.1 release
3f90cee Rationalize os specific build constraints
2be6202 Add option to panic in `test.NewNullLogger` to allow testing of calls
        to `Fatal*`
7b467df Skip func type value in fields.
a67f783 Update changelog for v1.1.0 release
73bc94e Add custom sorting function in text formatter
5a88d3c Add missing module dependency for windows build
629982b DisableColors in two tests to fix AppEngine configuration
0a8fc8d Add AppEngine test configurations to travis to a void regression
f1ce1ba Fix copypasta
90501cf Fix AppEngine builds
98c898c Fix gopherjs build constraint name
eed7c22 Fix travis build for go 1.11 with modules
66895ce Fix module name and remove unused dependencies
88eb166 Fix spelling in Entry.Buffer comment
f75951b Add go module support
4bcb47b commit to trigger appveyor build
8b12043 Fix example build on windows
7556e24 Use syslog instead of airbrake as syslog example
e58aa84 bump go toolchain version in travis
98d0f31 Add previously forgotten v1.0.6 description in changelog
90bf2e7 feat(LogLevel): taking in account code review from David Bariod
13d10d8 return old hooks from RelplaceHooks
7a0120e logger.ReplaceHooks
b5e6fae Cleanup on unit test on isColored
cadf2ce Add unit test for TextFormatter.isColored
eb968b6 Fix for CLICOLOR_FORCE handling
8a6a17c Fixed missing brace after wrong merge
d950ecd Remove unnecessary text_formatter file
da39da2 Keep terminal check naming convention
37d651c Add CLICOLOR support
179037f Ensure a new entry data fields are empty
d316277 Add logger benchmark
54db2bb limit the build/test matrix to the two latest stable version
6999e59 properly fix the hooks race test
725f3be Adds WithTime to Logger and Entry types, as well as a pure module-level
        function.
52b92f5 Allows overriding Entry.Time.
fc9bbf2 [#241] Allow to set writer during logger usage.
eed1c0f Fix GopherJS build tags
2ce6c0c Support for Entry data under nested JSON dictionary.
6b28c2c error message
5d60369 Fixed prefixFieldClashes for TextFormatter and added coverage
4225d69 feat: new methods to check enabled log level
070c81d Revert the change introduced in #707 and do the proper fix. Fixes #729
098a5a7 Move the hook services list to a wiki page
caed59e Fix Logger.WithField doscription
aa6766a PERF: use buffer pool in json formatter
b1e82be Update go versions in travis configuration.
8369e2f Fix a race condition in TestLoggingWithHooksRace
507c822 add mysql hook
e63a8df added Anexia CloudLog to list of hooks
5513c60 Improve documentation for Fatal* class functions
2f58bc8 Unified terminal initialization code handling
9bc59a5 Fixed initTerminal() was run for non-terminals
cf5eba7 Simplified file structure
c9a46a1 Added terminal check on Windows
7d2a521 Extended conditions to include non-native builds
f142d81 Improved building of non-windows code
bb487e0 Added support for text coloring on Windows 10
19b9c9e delete dead link
b537da5 Fix run-on sentence
723dd3c changed prettyprinting to use spaces as opposed to /t
c155da1 changelog: add 1.0.5
91b159d Add Kafka REST Proxy hook to README
c840e59 add gopherjs build tag
1893e9a Fixed: comment
f4118d2 reamde: add logrus-clickhouse-hook
efab7f3 Have prefixFieldClashes respect the JSON FieldMap
be56909 Make fireHooks() method receive a copy of Entry structure to avoid race
        conditions
178041e Fix typo in README.md
828a649 rename fieldLogger to entry
eeb6535 Lock mutex before formatting to avoid race
efbfdb5 Add failing test for using a FieldLogger with hooks inside goroutines
0cf9f0b Made text consistent with other hooks
516f6c1 Add Application Insights hook to README
977e033 Fix deadlock on panics at Entry.log
92aece5 TextFormatter behaviour aligned with stdlib log (fixes #167)
eb15690 remove .gitignore changes and update AddHook
20cc8e2 remove .gitignore changes
0c03a05 mirror and wrap Logger instance methods in exported.go
d682213 changelog: 1.0.4
b9eceae fix example
bf1fb70 Add FieldMap support to TestFormatter
73a1342 Fix typo in README.md
10d6a5b removed useless line from readme
639325f added pretty print option for json logs
9700beb Update README.md
1858a85 Adds `logbeat` hook to README
c44d524 Fix typo in docstring
4844e58 Add promrus to list of hooks.
7d3ddc6 Split terminal check to add build tags to support App Engine.
e3d1776 MD formatting
9ce1c9e add github path to log message in readme
b1db1b9 regex assertion rather than literal, for github path
3cb9e18 test updates
bc6d984 add caller logic to DisableTimestamp case
1f59c9a Add DisableLevelTruncation description to README
88dd8df responses to code review
d8fd234 add syntax hilighting to new example blocks
2e7c40e README formatting tweak
802fba1 add note on caller-reporting overhead to README
306956c tweak timing tests to handle slower VMs and older GoLang
65f3af3 simplify hasCaller check
a5c845c responses to review comments
4575b7a revert slight added complexity in NewEntry()
05a8f4d fix test description
348bace doc updates, and relabel ReportMethod
1e21450 push compilation even higher, to reduce to one call
8161d93 performance: precompile regex before iterating
473c344 Add README notes and CHANGELOG entries
93af604 First cut at adding calling method
e5b6713 Added testing for DisableLevelTruncation
7a1f601 Added ability to disable level text truncation. Fixes #406

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-15 17:23:54 +00:00
Peng Tao
c3629d37c4
Merge pull request #2239 from WeiZhang555/persist-storage
Land experimental "newstore" as formal feature
2020-01-14 13:12:05 +08:00
Julio Montes
3660bb426f
Merge pull request #2387 from devimc/topic/qemu/bump-4.1.1
versions: update qemu to 4.1.1
2020-01-13 10:15:20 -06:00
Julio Montes
0af481979b versions: update qemu to 4.1.1
Fixes CVE-2019-12068

fixes #2388

shortlog:
99c5874a9b Update version for 4.1.1 release
e092a17d38 mirror: Keep mirror_top_bs drained after dropping permissions
088f1e8fd9 block/create: Do not abort if a block driver is not available
145b562990 vhost: Fix memory region section comparison
42b6571357 memory: Provide an equality function for MemoryRegionSections
c0aca9352d memory: Align MemoryRegionSections fields
54c130493c tests: make filemonitor test more robust to event ordering
3d018ff3bd block: posix: Always allocate the first block
f0d3fa265d file-posix: Handle undetectable alignment
7db05c8a73 block/file-posix: Let post-EOF fallocate serialize
d9b88f7e0d block: Add bdrv_co_get_self_request()
590cff8230 block: Make wait/mark serialising requests public
2e2ad02f2c block/io: refactor padding
b3b76fc643 util/iov: improve qemu_iovec_is_zero
cff024fe85 util/iov: introduce qemu_iovec_init_extended
40df4a1bf7 qcow2-bitmap: Fix uint64_t left-shift overflow
b156178553 iotests: Add peek_file* functions
15f5e8c367 iotests: Add test for 4G+ compressed qcow2 write
405deba14f qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK
01be50603b virtio-blk: Cancel the pending BH when the dataplane is reset
051c9b3cbc scsi: lsi: exit infinite loop while executing script
           (CVE-2019-12068)
b387531323 target/xtensa: regenerate and re-import test_mmuhifi_c3 core
cdc6896659 target/arm: Allow reading flags from FPSCR for M-profile
c0b35d87de hbitmap: handle set/reset with zero length
fcd7cba6ac util/hbitmap: strict hbitmap_reset
aea18ef938 COLO-compare: Fix incorrect `if` logic
4887acf574 virtio-net: prevent offloads reset on migration
8010d3fce0 virtio: new post_load hook
6705b9344f ui: Fix hanging up Cocoa display on macOS 10.15 (Catalina)
c0e2fbf124 mirror: Do not dereference invalid pointers
b077ac637d iotests: Test large write request to qcow2 file
9e51c5306c qcow2: Limit total allocation range to INT_MAX
aae0faa5d3 hw/core/loader: Fix possible crash in rom_copy()
7b404cae7f vhost-user: save features if the char dev is closed
d868d30db6 iotests: Test internal snapshots with -blockdev
7a8aa6c734 block/snapshot: Restrict set of snapshot nodes
331c08d300 s390: PCI: fix IOMMU region init
fc5afb1a92 roms/Makefile.edk2: don't pull in submodules when building from
           tarball
c5c9b1362d make-release: pull in edk2 submodules so we can build it from
           tarballs
220816989c hw/arm/boot.c: Set NSACR.{CP11,CP10} for NS kernel boots
783e7eb52c block/backup: fix backup_cow_with_offload for last cluster
e01ed1a1ae block/backup: fix max_transfer handling for copy_range
416a692e51 qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation()
e9bb3d942e coroutine: Add qemu_co_mutex_assert_locked()
84f22c7285 block/qcow2: Fix corruption introduced by commit 8ac0f15f335
86b0f4022b blockjob: update nodes head while removing all bdrv
2d86df1f78 curl: Handle success in multi_check_completion
18e1b71937 curl: Report only ready sockets
0888ddac8e curl: Pass CURLSocket to curl_multi_do()
4be97ef966 curl: Check completion in curl_multi_do()
78ea94e389 curl: Keep *socket until the end of curl_sock_cb()
3648493495 curl: Keep pointer to the CURLState in CURLSocket
0694c489cd block/nfs: tear down aio before nfs_close
c9ffb12754 qcow2: Fix the calculation of the maximum L2 cache size
28a9a3558a libvhost-user: fix SLAVE_SEND_FD handling
9027d3fba6 target/arm: Don't abort on M-profile exception return in linux-user
           mode
38fb634853 target/arm: Free TCG temps in trans_VMOV_64_sp()
ad95e0573e iotests: Test blockdev-create for vpc
593beeaf81 iotests: Restrict nbd Python tests to nbd
eee776fbc0 iotests: Restrict file Python tests to file
819ba23575 iotests: Add supported protocols to execute_test()
4d9bdd3149 iotests: add testing shim for script-style python tests
97c478c355 vpc: Return 0 from vpc_co_create() on success
725dfa851f x86: do not advertise die-id in query-hotpluggbale-cpus if
           '-smp dies' is not set
57fdf4a13f pr-manager: Fix invalid g_free() crash bug
3361d03ff0 iotests: Test reverse sub-cluster qcow2 writes
6f1a94035b block/file-posix: Reduce xfsctl() use
c12adfd8f6 xen-bus: check whether the frontend is active during device reset...
b6cedc911e xen-bus: Fix backend state transition on device reset
7ebcd375ad pc: Don't make die-id mandatory unless necessary
4bfd496be3 target/alpha: fix tlb_fill trap_arg2 value for instruction fetch
499a5d6bb4 s390x/tcg: Fix VERIM with 32/64 bit elements
73a5bf4729 Revert "ide/ahci: Check for -ECANCELED in aio callbacks"
fbde196c30 dma-helpers: ensure AIO callback is invoked after cancellation

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-10 17:27:24 +00:00
Julio Montes
d34d66099f
Merge pull request #2363 from Pennyzct/config_file_on_jailer
FC: jailer failed when importing new flag "--config-file"
2020-01-10 08:44:12 -06:00
Alice Frosi
3594855094 s390x: fix refactoring
On s390x we need to set the devno that's why we need a custom
appendBlkDevice function.

Fixes: #2384

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2020-01-09 16:29:20 +01:00
Wei Zhang
290339da6b compatibility: keep oldstore for compatibility
Keep old store restore functions for keeping backward compatibility, if
old store files are found from disk, restore them with old store first.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2020-01-09 13:33:23 +08:00
Wei Zhang
4a298cb9b7 persist: address comments
Address some comments.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2020-01-08 10:03:56 +08:00
Wei Zhang
d33b154dd7 persist: add interface for global read/write
Add two interfaces for fs storage driver for supporting global writing
and reading, which is used by ACRN.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2020-01-08 10:03:56 +08:00
Wei Zhang
ed4a1954e4 persist: remove unused struct
Remove unused struct from persist structures.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:42:15 +08:00
Wei Zhang
8e88859ee4 persist: remove all usage of VCStore
Remove VCStore usage from all modules

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:42:15 +08:00
Wei Zhang
01b4a64be2 persist: remove VCStore from sandbox/apis
Remove VCStore usage from sandbox.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
b63e517f6d persist: replace sandbox lock with newstore.Lock
Replace rLockSandbox and rwLockSandbox with new store lock functions.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
508101bc0f persist: fix vmtemplate storage leak
Fix VM template storage leak by adding delete operations, we need to
delete sandbox storage dirs when stop VM.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
29b55ab88b persist: remove VCStore from container
Remove VCStore from container struct.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
633748aa76 persist: remove VCStore from hypervisor
Remove usage of VCStore from hypervisors.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:39:39 +08:00
Wei Zhang
687f2dbe84 persist: move "newstore" out of experimental
Fixes #803

Move "newstore" features out of experimental feature list, from this
commit "newstore" will be default enabled.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2019-12-30 18:39:39 +08:00
Fupan Li
3ea3d3201b
Merge pull request #2371 from bergwolf/ut
ut: fix make test failures
2019-12-27 08:40:18 +08:00
Peng Tao
3ed472dc8d store: UT tmp path should be random
Otherwise we might end up using the previously created store instead.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:38:59 -08:00
Peng Tao
5617120649 nsenter: skip ut on non-root
nsenter needs root privilege to run.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:38:54 -08:00
Peng Tao
e5b04a5bf2 ut: fs test should set RunStoragePath
Otherwise it failes with permission errors.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
9bf0d67fdd ut: direct factory needs to set VCStorePrefix
Otherwise it fails with permission errors.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
4c35d0911a vc: set store RunVMStoragePath for ut
Otherwise we fail ut on failures like:

=== RUN   TestCloudHypervisorCleanupVM
--- FAIL: TestCloudHypervisorCleanupVM (0.00s)
    clh_test.go:191: cloudHypervisor.cleanupVM() expected error != open /run/vc/vm: permission denied
    clh_test.go:200: Unexpected error = stat /run/vc/vm/cleanVMID: permission denied
=== RUN   TestClhCreateSandbox
--- PASS: TestClhCreateSandbox (0.00s)
=== RUN   TestClooudHypervisorStartSandbox
time="2019-12-25T00:48:47-08:00" level=error msg="trace called before context set" source=virtcontainers subsystem=cloudHypervisor type=bug
--- FAIL: TestClooudHypervisorStartSandbox (0.00s)
        Error Trace:    clh_test.go:266
        Error:          Received unexpected error:
                        mkdir /run/vc/vm: permission denied

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
3deb24e5de cli: flush coverage report in defer function
Do not flush it atexit(), where the test report file might be already
closed and it causes go test failure like:

PASS
testing: can't write /tmp/go-build146132196/b001/testlog.txt: close /tmp/go-build146132196/b001/testlog.txt: file already closed
FAIL    github.com/kata-containers/runtime/cli  4.256s

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
f56d70ccd6 vc: UT should set VCStorePrefix
Otherwise we fail to run it with non-root user with errors like:
`mkdir /var/lib/vc/uuid: permission denied`

Fixes: #2370
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Penny
b9120b2bb1
Merge pull request #2373 from bergwolf/image
qemu: add disable_image_nvdimm option
2019-12-26 10:17:52 +08:00
Peng Tao
7c7a4a3b11 annotations: add disable_image_nvdimm
So that users can use annotations to set it.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-25 00:39:37 -08:00
Peng Tao
652bb76dde cli: syscall return value check is wrong
ret is uintptr and always >= 0. errno is enough for error checking.
This is causing lint error:
/home/vagrant/workplace/golang/src/github.com/kata-containers/runtime/virtcontainers/utils
cli/kata-check.go:446:20: SA4003: no value of type uintptr is less than 0 (staticcheck)
                if errno != 0 || ret <= 0 {
                                 ^

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-24 23:53:29 -08:00
Peng Tao
a8717286ca qemu: add disalbe_image_nvdimm option
To control whether an image rootfs is used as nvdimm device or just
plain virtio-block device.

Fixes: #2372
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-24 23:16:48 -08:00
Peng Tao
dd5b446997 qemu: refactor appendImage
Do not implement in each arch code. We should have a generic
implementation instead.

-. amd64 and arm64 uses nvdimm
-. ppc64le and s390x uses virtio-blk

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-24 20:13:50 -08:00
Julio Montes
1296f6f1ad
Merge pull request #2368 from jcvenegas/clh-unit-test
clh: Increase unit test using mock testing
2019-12-20 12:58:18 -06:00
Jose Carlos Venegas Munoz
a2d3f9f32d vitiofsd: Add virtiofsd interaface
In oderder to make unit testing simpler,
lets add an interface that could be mocked.

Let hypervisor have a instance of virtiofsd interface,
and this makes a loose dependency to allow mock testing.

With the inteface is possible to add startSandbox unit test:

- use utils.StartCmd to mock call to start hypervisor process.

- Add unit test for startSandbox.

Fixes: #2367

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-20 17:21:03 +00:00
Jose Carlos Venegas Munoz
2a085ee67b clh: virtiofsd: check path is not empty
Check if path is not empty this makes, this help
unit test know why the function failed.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-20 17:21:03 +00:00
Jose Carlos Venegas Munoz
af5c9c2320 clh: hypervisor: Do not set 9p values for virtiofs
9p values are ignored by virtiofs, but this should be
not changed on validation to allow have unit test with
virtiofs config.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-20 17:21:03 +00:00
Jose Carlos Venegas Munoz
6a10cd960d clh: test: add unit test
Add unit test for clh.

- Check endpoint has valid values for CH.
- Add unit tests
- Add force flag to ignore cleanup errors.
- Add unit tests.
- Fail if hypervisor ID is empty.
- Add createSandbox uni test

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-20 17:19:52 +00:00
Jose Carlos Venegas Munoz
8a439eab9d clh: add Client Interface and bootVM test
Add interface with the same methods of client,
this will help to decouple the implementation
and help use to do mock testing.

Add Mock client and add bootVM unit test

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-20 17:19:19 +00:00
Penny Zheng
09198eed84 FC: jailer failed when importing new flag "--config-file"
When we used jailer to launch firecracker, kata container failed due
to the following causes:
1. new flag `--config-file` belongs to the jailed firecracker,
so, adhering to the `end of command options` convention, we need to
give `--config-file` a prefix `--`.
2. The path of the config file(`fcConfig.json`) should be also
relative to the jailed firecracker.
3. Since we do the configuration before func `fcInit` now, we also need
to bring `jailer check` ahead.
4. The config file should be umounted and cleaned up.

Fixes: #2362

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-12-19 05:47:43 +00:00
Jose Carlos Venegas Munoz
a198efcf1d
Merge pull request #2366 from GabyCT/topic/updateurl
versions: Update cloud hypervisor url
2019-12-18 14:45:19 -06:00
Gabriela Cervantes
661956f5bc versions: Update cloud hypervisor url
This updates the cloud hypervisor url.

Fixes #2365

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-12-18 12:46:42 -06:00
Archana Shinde
3ea682d6e0
Merge pull request #2320 from amshinde/fix-rootless-net-none
rootless: fix rootless for case net=none
2019-12-16 14:21:38 -08:00
Archana Shinde
b96c7e5abe rootless: fix rootless for case net=none
When kata-runtime was invoked as rootless by podman with
net=none, an empty net namespace path is provided.
kata-runtime was then trying to create a new network namespace
and bind-mounting it under /var/run/netns, resulting in a permission error.

Instead, with this commit, the runtime checks if it is
running rootless and instead creates network namespace bind mount
under rootless directory instead.

Fixes #2319

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-12-16 12:26:57 -08:00
Peng Tao
3de4bdd508
Merge pull request #2285 from teawater/update_a
vendor: Update github.com/kata-containers/agent
2019-12-16 20:21:23 +08:00
Hui Zhu
a215f87e23 vendor: Update github.com/kata-containers/agent to handle hvsock issue
Update github.com/kata-containers/agent to handle hvsock issue.

Shortlog:
    33f3208 client.go: HybridVSockDialer: Close dup fd after receive packet
    74a3b95 release: Kata Containers 1.10.0-rc0
    afd0871 ci: install docker before configure
    c502552 client.go: HybridVSockDialer: Check return size n of unix.Recvfrom
    f8e4ce8 client.go: HybridVSockDialer: Change Read EOT to recv peek
    5b64d42 agent: get current cpuset from /sys/devices/system/cpu/online
    183a24a release: Kata Containers 1.10.0-alpha1
    1ee8516 config: add option to control hotplug timeout of block devices
    40567f6 release: Kata Containers 1.10.0-alpha0
    19bee57 agent: connect debugging console in a specific vsock port
    8361150 docs: Add enable services and installation steps for TRACING.md
    a4f7373 agent: fix pause bin on musl
    f9f129a docs: Add missing steps at TRACING.md
    d3e66bf tracing: Wrapper for tracing functions
    7a7dba7 network: ensure parent directories exist
    455f728 tracing: Generate an alias for opentracing.Span
    5f302e5 agent: Revert "client: remove the parameter of 'enableYamux'"
    717ee24 client: remove the parameter of 'enableYamux'
    d387c77 vendor: Update github.com/syndtr/gocapability/capability
    b3d737b vendor: update libcontainer to 1.0.0-rc9
    6eac713 release: Kata Containers 1.9.0-rc0

Fixes: #2284

Signed-off-by: Hui Zhu <teawater@antfin.com>
2019-12-16 14:52:12 +08:00
Xu Wang
39d7a144a9
Merge pull request #2333 from bergwolf/configpath
shimv2: support runtime config path via annotation
2019-12-16 12:37:28 +08:00
Hui Zhu
68fc9abc5e
Merge pull request #2346 from bergwolf/hostdir
shimv2: clean up properly if vmm quits unexpectedly
2019-12-16 10:34:37 +08:00
Xu Wang
af3a710921
Merge pull request #2356 from teawater/update_sys
vendor: Update golang.org/x/sys
2019-12-15 16:31:14 +08:00
Peng Tao
1c11fe20ba shimv2: support runtime config path via annotation
So that user can have per pod runtime config which is easiler
to manage in some cases.

Fixes: #2332
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-14 20:13:07 -08:00
Hui Zhu
6cd9b3b0b6 vendor: Update golang.org/x/sys
Update golang.org/x/sys to ac767d655b305d4e9612f5f6e33120b9176c4ad4
that same with agent.

Shortlog for golang.org/x/sys:
    ac767d6 windows/svc/mgr: add ability to set a reboot message and command when a service fails
    1b2967e unix: implement RFCOMM sockets on Linux
    7b495ad unix: update Dockerfile to Go 1.11beta1
    3c6ecd8 windows: add missing file attributes
    ce36f38 unix: regenerate syscall wrappers for linux/ppc64{,le}
    151529c windows, windows/svc/mgr: add ability to modify service recovery settings.
    7138fd3 unix: do not return non-nil error for 0 errno in FcntlInt
    c4afb3e unix: fix TestUtimesNanoAt for filesystems with 1-second resolution time stamps
    a200a19 unix: don't check atime in TestUtimesNanoAt
    63fc586 unix: use private copy of ustat_t on Linux
    ad87a3a unix: check faccessat flags parameter on Linux
    fc8bd94 unix: don't use deprecated syscalls on linux/arm64
    f24d3d4 unix: add Faccessat on Solaris
    6c888cc windows: replace uintptr in crypto structs
    8014b7b windows: follow convention for generated code comment
    8883426 plan9: follow convention for generated code comment
    9e6071e unix: follow convention for generated code comment
    56ede36 unix: add rtc defines and types
    8ee9f3e unix: add Faccessat on NetBSD
    f4b713d unix: add Faccessat on OpenBSD
    a9e25c0 unix: update Dockerfile to Ubuntu 18.04, Linux 4.17, and Go 1.10.3
    bff228c windows: update TOKEN_ALL_ACCESS according to WinNT.h
    24c297a unix: support compiling with gccgo on linux/386
    7c1e4f3 unix: drop use function stub for gccgo
    9527bec cpu: fix gccgo build
    bc2ef10 cpu: add gccgo implementation
    538ab54 cpu: introduce and export type CacheLinePad
    c11f84a unix: don't check atime in TestStatx
    d4cedef unix: make Nfgenmsg a type definition
    3135538 unix: add nftables defines and types
    b269ba2 unix: fix TestXattr on android
    04b8398 unix: fix or skip failing tests on android and iOS
    e2c7578 unix: delete TestDevices for *BSD and Darwin
    56ad15c windows: add QueryServiceStatusEx function
    77b0e43 unix: add symlink-safe *xattr functions on darwin
    f3b0f5f unix: skip TestStatx if the operation is not permitted
    028bb33 unix: delete TestDevices test for Solaris
    88eb85a unix: add tests for *xattr functions
    dc67e5b windows: address error reported by vet
    0b6bef9 unix: add {get,set,remove,list}xattr on darwin
    7f59abf unix: update openbsd/amd64 to OpenBSD 6.3
    89da893 unix: exclude AUDIT_RECORD_MAGIC constant on darwin
    7c87d13 unix: add tpacket types and constants on Linux
    d0faeb5 unix: fix TestSCMCredentials to not fail when root
    9950ad1 unix: add statfs and filesystem magic constants on Linux
    7dfd129 windows: address vet reports
    64746a4 unix: address vet's finding of  wrong argument size
    7db1c3b cpu: use t.Fatal instead of t.Fatalf
    6f686a3 unix: add ErrnoName and SignalName
    78d5f26 windows/svc: correct MOVL instruction in sys_amd64.s
    4adea00 cpu: new package
    f67ecc1 unix: use Fstatat for Stat on linux/amd64
    cbbc999 unix: use pselect on amd64 to satisfy Android
    bb9c189 unix: 32-bit MIPS splice system call returns int, not int64
    79b0c68 unix: add Linux block device ioctl types and constants
    a2a4594 unix: avoid extra syscall on send/recvmsg on Linux
    3ccc7e5 unix: fix typos in linux/types.go.
    9b00609 unix: add tcp_md5sig on Linux
    b126b21 unix: re-export Fsid and Sigset_t Val member on Linux
    ecfd8b5 unix: implement getrtable/setrtable syscalls on OpenBSD
    2f57af4 unix: add wrapper around perf_event_open on Linux
    2281fa9 unix: don't export any padding/alignment fields on all platforms
    f6f3529 unix: add a step to mkall.go that generates ABI headers to be referenced from types.go
    3b87a42 unix: update Dockerfile to Linux 4.16 and Go 1.10.1
    1d206c9 unix: add FcntlInt
    fcb792c unix: unify Getsockopt*
    f67933e unix: solicit EPERM via wrong PID in creds test.
    378d26f unix: add CRTSCTS on netbsd and openbsd
    2de2067 unix: add sendfile support on Solaris
    13d03a9 unix: add GetsockoptLinger and GetsockoptTimeval
    91ee8cd unix: use strings.IndexByte instead of for loops
    1e3c777 unix: don't export padding fields on Darwin
    c488ab1 unix: add Fadvise on linux/{arm64,mipsx.mips64x,ppx64x,sparc64}
    ee8db00 unix: add Fadvise on NetBSD
    bb729a5 unix: fix TestFchmodat on Illumos
    6416052 unix: enable TestFchmodat for all Unices
    dd203b8 unix: add Fchmodat on NetBSD
    7ceb54c unix: add Fchmodat on DragonflyBSD
    f8f1a95 unix: add Fchmodat on OpenBSD
    d8e400b unix: fix example
    01acb38 plan9, unix, windows: add paragraph breaks in docs
    0deb464 unix: add Exec call
    2f1e207 unix: add IFLA attributes on linux/sparc64
    cc7307a unix: add Fstatat on Darwin
    5c2edb5 unix: add Fstatat on OpenBSD
    89ac7f2 CONTRIBUTING.md: remove note about not accepting Pull Requests
    932fb22 unix: add Fstatat on NetBSD
    2477406 unix: add Fstatat on FreeBSD
    bcaab34 unix: don't export padding fields on DragonflyBSD
    0edb963 unix: add Fstatat on DragonflyBSD
    6035cb0 unix: don't export padding fields on Solaris
    591c159 unix: add Fstatat on Solaris
    8c0ece6 unix: extend rlimit test on Linux
    c28acc8 unix: fix seek while compiling with gccgo under arm and 386
    7dca6fe plan9: use bytes.IndexByte instead of a for loop
    e64a828 unix: use bytes.IndexByte instead of a for loop
    349b81f unix: skip SchedAffinity test on single CPU system
    dd2ff4a unix: fix nil pointer dereference in Select on linux/{arm64,mips64x}
    f6cff07 windows/registry: improve ReadSubKeyNames permissions

Fixes: #2284

Signed-off-by: Hui Zhu <teawater@antfin.com>
2019-12-15 10:53:48 +08:00
GabyCT
449a3a9a14
Merge pull request #2344 from jcvenegas/test-api-fixes-clh
clh: update to latest master
2019-12-13 15:22:06 -06:00
Jose Carlos Venegas Munoz
9c3151e5ed clh: remove not requried values
- ip and mask are not needed anymore.
- fs queues are set by cloud-hypervisor.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-13 17:02:18 +00:00