Commit Graph

60 Commits

Author SHA1 Message Date
maximshd
aff54bb1f7 Properly initialize kubeClient in SetNetworkStatus method (#283)
* Properly initialize kubeClient in SetNetworkStatus method

* Fix typo

* Update error message

* Extend logging for setNetworkStatus function
2019-03-20 16:20:46 -04:00
Tomofumi Hayashi
57f1d7afc7 Caches all pod delegates json for pods deletion without k8s info
This fixes #243 with following changes:
 + Optimize to fetch Pod from k8s client
 + Change to use cache always in DEL.
 + If failed to fetch the pod info from k8s clinet in deletion,
  use cached delegates as emergency bailout
 + Add test cases for cache

fixed conflicts in multus/multus.go & multus/multus_test.go
2019-03-20 16:20:10 -04:00
Tomofumi Hayashi
1e4fe4f837 Add 'verbose' option to logging minimum information (#275)
This change address #274 to add 'verbose option which outputs
minimum information (for usual runs with a bit information than
'error').
2019-03-07 11:06:49 -05:00
dougbtv
61f9e08863 Allows cmdDel to finish if netns doesn't exist, omits deferred netns.Close() in such a case 2019-02-22 09:07:35 -05:00
Dan Williams
3a9cf4a9a2 multus: simplify teardown on add error and clarify error message
Signed-off-by: Dan Williams <dcbw@redhat.com>
2019-02-22 09:07:03 -05:00
Tomofumi Hayashi
73e10fb999 Add multusNamespace/systemNamespaces config
This change provides new configuration parameters, multusNamespace
and systemNamespaces for flexible namespace management.
The change addresses issue #252 and issue #253.
2019-02-19 09:53:17 -05:00
Mathieu Rohon
a51309c532 [dependency] Add portmap capability support (Other changes were dependent on changes made in this commit)
Signed-off-by: Mathieu Rohon <mathieu.rohon@orange.com>
2018-12-20 13:07:32 -05:00
dougbtv
1ee63551fa [bugfix] Delete all delegates instead of breaking out during deletion loop 2018-12-19 16:04:53 -05:00
Alona Kaplan
c4feebc6c9 [divergence] Support IPRequest to specify IP address for interface 2018-12-19 16:03:08 -05:00
Tomofumi Hayashi
787586aca8 Fix the log message. 2018-12-19 16:02:36 -05:00
Alona Kaplan
fd5ac6801c Setting the MAC in CNI_ARGS shouldn't override the already existing CNI_ARGS 2018-12-19 16:02:36 -05:00
Tomofumi Hayashi
ac3731380c Fix the way to set MAC. 2018-12-19 15:55:44 -05:00
Tomofumi Hayashi
0a0c8d042a Add debug messasge for MAC. 2018-12-19 15:55:44 -05:00
Tomofumi Hayashi
dae85d7781 Support MacRequest to specify MAC address for interface 2018-12-19 15:55:44 -05:00
Tomofumi Hayashi
bb89e538eb [divergence] Add clusterNetwork/defaultNetwork into multus
To support CRD/file/directory, add clusterNetwork/defaultNetwork
in multus.conf file.
2018-12-19 15:55:37 -05:00
Michael Cambria
7f389e7e7c Make conflistDel() behave like conflistAdd()
conflistAdd() finds binaries differently than conflistDel().
Make the two call find binaries the same way.

Fixes #179

Signed-off-by: Michael Cambria <mcambria@redhat.com>
2018-12-19 15:51:36 -05:00
Doug Smith
ae9a1a5c10 Default network readiness [NOTE: Conflict due to omitted commit during cherry pick for stable] 2018-11-01 22:41:56 +09:00
rkamudhan
f0f1d506c4 fixing the cmddel fix code 2018-08-17 00:45:05 +01:00
rkamudhan
b01f784504 handling the multiple cmd del call from kubelet 2018-08-17 00:45:05 +01:00
Tomofumi Hayashi
6d3216c340 Add debug log for newly added functions. 2018-08-17 00:43:31 +01:00
Tomofumi Hayashi
7d3626a5c0 Add logging message for debug/error
This changes adds logging message:debug and error. fmt.Errorf() is
wrapped by logging.Errorf() hence all error message is also put to
log file. logging.Debugf() is called at almost function call, so
we could track the code by logging message.
2018-08-17 00:43:31 +01:00
rkamudhan
1ad25a890d adding error checking in network status creation as well 2018-08-01 16:03:25 +01:00
rkamudhan
d71fe3447f fixing multus runtime error for network status without pod network annotation 2018-08-01 16:03:25 +01:00
rkamudhan
8bb09518df adding network status features 2018-07-30 14:58:30 +01:00
rkamudhan
7372922617 adding conflist support 2018-07-27 23:43:17 +01:00
Dan Williams
42e6894962 k8sclient: use InClusterConfig() for kubeclient when run as daemonset
When multus is run inside a container, eg as a daemonset, we can use
InClusterConfig() to automatically get the service account token, the
CA certificate, and the apiserver address, all without a kubeconfig
file.
2018-07-27 12:08:24 +01:00
Dan Williams
ac9e46f712 multus/k8s: allow faking k8s client for unit tests 2018-06-20 18:20:57 +01:00
Dan Williams
f4f6a6cbed multus: rework cmdAdd/Del/Get calling to support testcases 2018-06-20 18:20:57 +01:00
Dan Williams
afa87024eb multus: pass exec interface to invoke package
Will help with unit tests.
2018-06-20 18:20:57 +01:00
Dan Williams
7597640a21 multus: update for CNI 0.7.0-alpha1 release 2018-06-20 18:20:57 +01:00
Dan Williams
92a8b1c1c9 vendor: update containernetworking/cni and add containernetworking/plugins
Updated containernetworking/cni moves pkg/ns to containernetworking/plugins
so we need that now too.
2018-06-20 18:20:57 +01:00
Dan Williams
61d212c59a multus/types: handle delegates as Go structs and other cleanups 2018-06-20 18:20:57 +01:00
Tomofumi Hayashi
ee8bf5785d Following group name changes in github.
This changes to track organization name change in github, from
Intel-Corp to intel.
2018-05-18 15:34:12 +09:00
Tomofumi Hayashi
215ddb5a1d Refine multus config file (masterplugin and always_use_default)
This fix removes 'masterplugin' and 'always_use_default' from
multus config file. default network, defined in
/etc/cni/net.d/*conf should be master and this network should be
used as default from network plumbing working group draft.
2018-05-11 17:39:43 +01:00
kuralamudhan ramakrishnan
fd79ef6505 Code refactoring and including conf dir in the CNI Conf file option
Change-Id: I2b35377356f2144fd3889bf5de7ac430a19edf89
Co-authored-by: Doug Smith <dougbtv@users.noreply.github.com>
Co-authored-by: Tomofumi Hayashi <s1061123@users.noreply.github.com>
Co-authored-by: Dan Williams <dcbw@users.noreply.github.com>
2018-05-09 18:23:08 +01:00
Tomofumi Hayashi
f0794119ba
Add error message for ifname collision (#74)
* Add error message for ifname collision

This changes introduce to validateIfName, to check the validation
for interface name, i.e. same name among two or more interfaces.
2018-05-09 15:33:44 +09:00
Tomofumi Hayashi
4eeb1fa43f Fix default case for CNIDir
In case of no-config for CNIDir, multus-cni does not set
defaultCNIDir into CNIDir hence multus-cni failed to create
container network. This change fixes it.
2018-05-08 15:24:49 +09:00
Tomofumi Hayashi
0bdadc7f39 Fix error type for NoK8sNetworkError
This fix changes type type for NoK8sNetworkError due to error handling, in #45.
Currently NoK8sNetworkError is not pointer type, just a string, hence we never
get *NoK8sNetworkError. This fix changes it based @One-ders patch.
2018-04-24 10:27:48 +01:00
Tomofumi Hayashi
362be285c9 Revert "Fix error type for NoK8sNetworkError"
This reverts commit 3245ed8577, due to
missing pull request process. will file it again as pull request.
2018-04-23 15:49:16 +09:00
Tomofumi Hayashi
3245ed8577 Fix error type for NoK8sNetworkError
This fix changes type type for NoK8sNetworkError due to error handling, in #45.
Currently NoK8sNetworkError is not pointer type, just a string, hence we never
get *NoK8sNetworkError. This fix changes it based @One-ders patch.
2018-04-23 15:48:04 +09:00
kuralamudhan ramakrishnan
f0a7612ebd code refractoring with separate k8s-client package
bug fix for #56 & #57

Change-Id: If4f3db4dd01ca3330d5d36b8a2e4c5740def910a
Co-authored-by: Doug Smith <dougbtv@users.noreply.github.com>
Co-authored-by: Tomofumi Hayashi <s1061123@users.noreply.github.com>
Co-authored-by: Dan Williams <dcbw@users.noreply.github.com>
2018-04-21 16:09:17 +01:00
kuralamudhan ramakrishnan
122dbfb345 adding type package in multus 2018-04-18 09:20:54 +01:00
Doug Smith
ceef90f8b6
Merge pull request #11 from redhat-nfvpe/dev/default_network
[npwg] Prototype for default network
2018-04-06 13:11:58 -04:00
dougbtv
dc111cbdac [npwg] Prototype for default network, addresses #2 2018-04-04 14:54:41 -04:00
Tomofumi Hayashi
ebb19edfc3 Prototype for namespace support, addresses #15 2018-04-03 16:09:46 +09:00
Tomofumi Hayashi
393d5f47e5 Add 'go fmt', golint and 'go vet' in CI
This change introduces go fmt/golint/go vet in CI pipeline to check
the code for each commit. In addition, this change changes code
to pass these checks.
2018-04-03 15:18:47 +09:00
Tomofumi Hayashi
8f7c57b22b Merge remote-tracking branch 'origin/develop' into dev/add_if_name 2018-03-23 15:19:54 +09:00
Tomofumi Hayashi
633ddf384d Support '@<ifname>' in network annotation. 2018-03-23 13:59:31 +09:00
dougbtv
b7ab17493f [npwg] implements comma delimited + json scheme 2018-03-13 07:51:54 -04:00
dougbtv
8493e62fb3 [npwg] implements comma delimited + json scheme 2018-03-12 13:50:52 -04:00