Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix end-to-end tests #301

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
47a1dff
bubble up WatchEvent::Error in controller
kate-goldenring Apr 9, 2021
080959c
cargo fmt fixes
kate-goldenring Apr 9, 2021
697c0e1
use anyhow error
kate-goldenring Apr 9, 2021
3a01094
cargo fmt fixes
kate-goldenring Apr 9, 2021
6e53bba
log node spec on modified events
kate-goldenring Apr 9, 2021
b5fc333
increase version
kate-goldenring Apr 9, 2021
67994f3
Merge branch 'main' into propagate-watch-error
kate-goldenring Apr 9, 2021
c947483
enable rbac and dns in one line
kate-goldenring Apr 9, 2021
69ec73a
use release builds
kate-goldenring Apr 9, 2021
312a0c9
Merge branch 'main' into propagate-watch-error
kate-goldenring Apr 19, 2021
b35efd3
use debug builds
kate-goldenring Apr 19, 2021
cd2523a
try up to 5 times to query pods and save logs
kate-goldenring Apr 19, 2021
a41360a
Revert "try up to 5 times to query pods and save logs"
kate-goldenring Apr 20, 2021
8989cec
reduce kubelet cpu and mem limits for MicroK8s e2e tests
kate-goldenring Apr 20, 2021
995f077
patch kubelet args as sudo
kate-goldenring Apr 20, 2021
1fbb7bc
Merge branch 'main' into propagate-watch-error
kate-goldenring Apr 20, 2021
d0a18af
Revert "cargo fmt fixes"
kate-goldenring Apr 20, 2021
b58fe58
Revert "use anyhow error"
kate-goldenring Apr 20, 2021
10d36ae
Revert "cargo fmt fixes"
kate-goldenring Apr 20, 2021
e0a60bb
Revert "bubble up WatchEvent::Error in controller"
kate-goldenring Apr 20, 2021
1256383
use release builds
kate-goldenring Apr 20, 2021
2e198cd
use Alpine linux for debug echo
kate-goldenring Apr 20, 2021
c1bbcf2
also use shell in debug echo configuration documentation
kate-goldenring Apr 20, 2021
5a958e2
increase version due to debug echo image change
kate-goldenring Apr 20, 2021
70e15ad
try breaking up stop and start commands
kate-goldenring Apr 20, 2021
e06aa7b
remove kubelet defaults modifications and start and stop
kate-goldenring Apr 20, 2021
ad49ec9
Revert "remove kubelet defaults modifications and start and stop"
kate-goldenring Apr 21, 2021
a9a0e88
show more tracing when installing MicroK8s
kate-goldenring Apr 21, 2021
5568d6a
just restart kubelet
kate-goldenring Apr 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.5.0"
version = "0.5.1"
authors = ["<bfjelds@microsoft.com>"]
edition = "2018"

Expand Down
26 changes: 16 additions & 10 deletions controller/src/util/instance_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ async fn internal_do_instance_watch(
// Currently, this does not handle None except to break the
// while.
while let Some(event) = instances.next().await {
// Aquire lock to ensure cleanup_instance_and_configuration_svcs and the
// Acquire lock to ensure cleanup_instance_and_configuration_svcs and the
// inner loop handle_instance call in internal_do_instance_watch
// cannot execute at the same time.
let _lock = synchronization.lock().await;
trace!("internal_do_instance_watch - aquired sync lock");
trace!("internal_do_instance_watch - acquired sync lock");
handle_instance(event?, kube_interface).await?;
}
}
Expand All @@ -108,37 +108,43 @@ async fn internal_do_instance_watch(
async fn handle_instance(
event: WatchEvent<KubeAkriInstance>,
kube_interface: &impl KubeInterface,
) -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
) -> Result<(), anyhow::Error> {
trace!("handle_instance - enter");
match event {
WatchEvent::Added(instance) => {
info!(
"handle_instance - added Akri Instance {}: {:?}",
instance.metadata.name, instance.spec
);
handle_instance_change(&instance, &InstanceAction::Add, kube_interface).await?;
handle_instance_change(&instance, &InstanceAction::Add, kube_interface)
.await
.map_err(|e| anyhow::format_err!("{}", e))?;
Ok(())
}
WatchEvent::Deleted(instance) => {
info!(
"handle_instance - deleted Akri Instance {}: {:?}",
instance.metadata.name, instance.spec
);
handle_instance_change(&instance, &InstanceAction::Remove, kube_interface).await?;
handle_instance_change(&instance, &InstanceAction::Remove, kube_interface)
.await
.map_err(|e| anyhow::format_err!("{}", e))?;
Ok(())
}
WatchEvent::Modified(instance) => {
info!(
"handle_instance - modified Akri Instance {}: {:?}",
instance.metadata.name, instance.spec
);
handle_instance_change(&instance, &InstanceAction::Update, kube_interface).await?;
Ok(())
}
WatchEvent::Error(ref e) => {
trace!("handle_instance - error for Akri Instance: {}", e);
handle_instance_change(&instance, &InstanceAction::Update, kube_interface)
.await
.map_err(|e| anyhow::format_err!("{}", e))?;
Ok(())
}
WatchEvent::Error(ref e) => Err(anyhow::format_err!(
kate-goldenring marked this conversation as resolved.
Show resolved Hide resolved
"handle_instance - error for Akri Instance: {}",
e
)),
}
}

Expand Down
6 changes: 6 additions & 0 deletions controller/src/util/node_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ impl NodeWatcher {
}
WatchEvent::Modified(node) => {
trace!("handle_node - Modified: {:?}", &node.metadata.name);
trace!(
"handle_node - Modified with Node Status {:?} and NodeSpec: {:?}",
&node.status,
&node.spec
);
if self.is_node_ready(&node) {
self.known_nodes
.insert(node.metadata.name.clone(), NodeState::Running);
Expand Down Expand Up @@ -166,6 +171,7 @@ impl NodeWatcher {

/// This determines if a node is in the Ready state.
fn is_node_ready(&self, k8s_node: &NodeObject) -> bool {
trace!("is_node_ready - for node {:?}", k8s_node.metadata.name);
k8s_node
.status
.as_ref()
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0
version: 0.5.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.5.0
appVersion: 0.5.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "debug-echo-discovery-handler"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "onvif-discovery-handler"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opcua-discovery-handler"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-discovery-handler"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/debug-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-debug-echo"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-onvif"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/opcua/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-opcua"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/udev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-udev"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion discovery-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-discovery-utils"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion samples/brokers/udev-video-broker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-video-broker"
version = "0.5.0"
version = "0.5.1"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-shared"
version = "0.5.0"
version = "0.5.1"
authors = ["<bfjelds@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.5.1
2 changes: 1 addition & 1 deletion webhooks/validating/configuration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "webhook-configuration"
version = "0.5.0"
version = "0.5.1"
authors = ["DazWilkin <daz.wilkin@gmail.com>"]
edition = "2018"

Expand Down