Skip to content

Commit

Permalink
LFX Mentorship 2024_01 test task
Browse files Browse the repository at this point in the history
Completed the task for antrea-io#5896 as mentioned here antrea-io#5976. Added all the five .txt files
and modified the source code of antrea-agent and antrea-controller.
Looking forward to contribute more in antrea.io.
  • Loading branch information
ambuj-1211 committed Feb 18, 2024
1 parent f07d2eb commit 17abc9b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1 deletion.
11 changes: 11 additions & 0 deletions agent1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
I0216 12:43:03.188089 1 log_file.go:93] Set log file max size to 104857600
I0216 12:43:03.536584 1 agent.go:104] "Starting Antrea agent" version="v2.0.0-dev-a5e2792"
I0216 12:43:03.576941 1 client.go:89] No kubeconfig file was specified. Falling back to in-cluster config
I0216 12:43:04.004052 1 prometheus.go:189] Initializing prometheus metrics
I0216 12:43:04.072399 1 ovs_client.go:71] Connecting to OVSDB at address /var/run/openvswitch/db.sock
I0216 12:43:04.150656 1 agent.go:412] Setting up node network
I0216 12:43:04.160490 1 discoverer.go:82] Starting ServiceCIDRDiscoverer
I0216 12:43:05.670139 1 agent.go:1023] "Got Interface MTU" MTU=1450
I0216 12:43:05.712612 1 ovs_client.go:114] Bridge exists: 493a1261-99cd-4e6d-9e6a-3442e72ecb62
I0216 12:43:06.466158 1 route_linux.go:192] Initializing iptables

11 changes: 11 additions & 0 deletions agent2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
I0216 13:07:21.616301 1 log_file.go:93] Set log file max size to 104857600
I0216 13:07:21.642886 1 agent.go:104] "Starting Antrea agent" version="v2.0.0-dev-a5e2792"
I0216 13:07:21.653744 1 client.go:89] No kubeconfig file was specified. Falling back to in-cluster config
I0216 13:07:21.716160 1 prometheus.go:189] Initializing prometheus metrics
I0216 13:07:21.720415 1 ovs_client.go:71] Connecting to OVSDB at address /var/run/openvswitch/db.sock
I0216 13:07:21.738691 1 agent.go:412] Setting up node network
I0216 13:07:21.741971 1 discoverer.go:82] Starting ServiceCIDRDiscoverer
F0216 13:07:21.753648 1 main.go:53] Error running agent: error initializing agent: failed to get Node with name antrea-cluster-1-control-plane from K8s: Get "https://10.96.0.1:443/api/v1/nodes/antrea-cluster-1-control-plane": dial tcp 10.96.0.1:443: connect: connection refused
goroutine 1 [running]:
k8s.io/klog/v2/internal/dbg.Stacks(0x0)

2 changes: 2 additions & 0 deletions antrea-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
agentVersion: 2.0.0-dev-a5e2792.clean
antctlVersion: v2.0.0-dev-a5e2792
2 changes: 2 additions & 0 deletions cmd/antrea-agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import (
"antrea.io/antrea/pkg/ovs/ovsctl"
"antrea.io/antrea/pkg/signals"
"antrea.io/antrea/pkg/util/channel"
"antrea.io/antrea/pkg/util/env"
"antrea.io/antrea/pkg/util/k8s"
"antrea.io/antrea/pkg/util/lazy"
"antrea.io/antrea/pkg/util/podstore"
Expand All @@ -101,6 +102,7 @@ var ipv4Localhost = net.ParseIP("127.0.0.1")

// run starts Antrea agent with the given options and waits for termination signal.
func run(o *Options) error {
klog.InfoS("Github Username: ambuj-1211", "Pod Name", env.GetPodName())
klog.InfoS("Starting Antrea agent", "version", version.GetFullVersion())

// Create K8s Clientset, CRD Clientset, Multicluster CRD Clientset and SharedInformerFactory for the given config.
Expand Down
4 changes: 3 additions & 1 deletion cmd/antrea-controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ var allowedPaths = []string{

// run starts Antrea Controller with the given options and waits for termination signal.
func run(o *Options) error {
klog.Infof("Starting Antrea Controller (version %s)", version.GetFullVersion())

klog.InfoS("Github Username: ambuj-1211", "Pod Name", env.GetPodName())
klog.InfoS("Starting Antrea Controller (version %s)", version.GetFullVersion())
// Create K8s Clientset, Aggregator Clientset, CRD Clientset and SharedInformerFactory for the given config.
// Aggregator Clientset is used to update the CABundle of the APIServices backed by antrea-controller so that
// the aggregator can verify its serving certificate.
Expand Down
10 changes: 10 additions & 0 deletions controller.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
I0216 13:08:48.183953 1 log_file.go:93] Set log file max size to 104857600
I0216 13:08:48.186696 1 controller.go:124] Starting Antrea Controller (version v2.0.0-dev-a5e2792)
I0216 13:08:48.187134 1 client.go:89] No kubeconfig file was specified. Falling back to in-cluster config
I0216 13:08:48.239995 1 selfsignedcert_provider.go:251] "Writing certificate and key to the cert directory"
I0216 13:08:48.756927 1 log_file.go:121] Starting log file monitoring. Maximum log file number is 4
I0216 13:08:48.757066 1 prometheus.go:124] Initializing prometheus metrics
I0216 13:08:48.757626 1 controller.go:152] "Starting" controller="EgressController"
I0216 13:08:48.757625 1 controller.go:166] Starting GroupEntityController
I0216 13:08:48.757704 1 shared_informer.go:270] Waiting for caches to sync for GroupEntityController
I0216 13:08:48.757704 1 shared_informer.go:270] Waiting for caches to sync for EgressController
3 changes: 3 additions & 0 deletions ovs-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ovs-vsctl (Open vSwitch) 2.17.7
DB Schema 8.3.0

0 comments on commit 17abc9b

Please sign in to comment.