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

Packaging for openSUSE: test app::pods::tests::test_pod_from_api fails #391

Open
johanneskastl opened this issue Oct 10, 2023 · 2 comments

Comments

@johanneskastl
Copy link

johanneskastl commented Oct 10, 2023

Hi,

I am packaging this for openSUSE, which is almost working. But one of the tests is failing:

[  626s] failures:
[  626s] 
[  626s] ---- app::pods::tests::test_pod_from_api stdout ----
[  626s] thread 'app::pods::tests::test_pod_from_api' panicked at 'assertion failed: `(left == right)`
[  626s]   left: `KubePod { namespace: "default", name: "frontend-5c4745dfdb-6k8wf", ready: (0, 0), status: "OutOfcpu", restarts: 0, cpu: "", mem: "", age: "127w6d18h", containers: [KubeContainer { name: "server", image: "gcr.io/google-samples/microservices-demo/frontend:v0.2.2", ready: "false", status: "<none>", restarts: 0, liveliness_probe: true, readiness_probe: true, ports: "8080", age: "127w6d18h", pod_name: "frontend-5c4745dfdb-6k8wf", init: false, k8s_obj: None }], k8s_obj: Pod { metadata: ObjectMeta { annotations: Some({"sidecar.istio.io/rewriteAppHTTPProbers": "true"}), cluster_name: None, creation_timestamp: Some(Time(2021-04-27T10:14:48Z)), deletion_grace_period_seconds: None, deletion_timestamp: None, finalizers: None, generate_name: Some("frontend-5c4745dfdb-"), generation: None, labels: Some({"app": "frontend", "pod-template-hash": "5c4745dfdb"}), managed_fields: Some([]), name: Some("frontend-5c4745dfdb-6k8wf"), namespace: Some("default"), owner_references: Some([OwnerReference { api_version: "apps/v1", block_owner_deletion: Some(true), controller: Some(true), kind: "ReplicaSet", name: "frontend-5c4745dfdb", uid: "0177c475-1b94-424a-bdee-a2f56b071c19" }]), resource_version: Some("2362"), self_link: Some("/api/v1/namespaces/default/pods/frontend-5c4745dfdb-6k8wf"), uid: Some("7f6517f6-e0ec-486b-8971-c3a71075f913") }, spec: Some(PodSpec { active_deadline_seconds: None, affinity: None, automount_service_account_token: None, containers: [Container { args: None, command: None, env: Some([EnvVar { name: "PORT", value: Some("8080"), value_from: None }, EnvVar { name: "PRODUCT_CATALOG_SERVICE_ADDR", value: Some("productcatalogservice:3550"), value_from: None }, EnvVar { name: "CURRENCY_SERVICE_ADDR", value: Some("currencyservice:7000"), value_from: None }, EnvVar { name: "CART_SERVICE_ADDR", value: Some("cartservice:7070"), value_from: None }, EnvVar { name: "RECOMMENDATION_SERVICE_ADDR", value: Some("recommendationservice:8080"), value_from: None }, EnvVar { name: "SHIPPING_SERVICE_ADDR", value: Some("shippingservice:50051"), value_from: None }, EnvVar { name: "CHECKOUT_SERVICE_ADDR", value: Some("checkoutservice:5050"), value_from: None }, EnvVar { name: "AD_SERVICE_ADDR", value: Some("adservice:9555"), value_from: None }, EnvVar { name: "ENV_PLATFORM", value: Some("gcp"), value_from: None }]), env_from: None, image: Some("gcr.io/google-samples/microservices-demo/frontend:v0.2.2"), image_pull_policy: Some("IfNotPresent"), lifecycle: None, liveness_probe: Some(Probe { exec: None, failure_threshold: Some(3), http_get: Some(HTTPGetAction { host: None, http_headers: Some([HTTPHeader { name: "Cookie", value: "shop_session-id=x-liveness-probe" }]), path: Some("/_healthz"), port: Int(8080), scheme: Some("HTTP") }), initial_delay_seconds: Some(10), period_seconds: Some(10), success_threshold: Some(1), tcp_socket: None, termination_grace_period_seconds: None, timeout_seconds: Some(1) }), name: "server", ports: Some([ContainerPort { container_port: 8080, host_ip: None, host_port: None, name: None, protocol: Some("TCP") }]), readiness_probe: Some(Probe { exec: None, failure_threshold: Some(3), http_get: Some(HTTPGetAction { host: None, http_headers: Some([HTTPHeader { name: "Cookie", value: "shop_session-id=x-readiness-probe" }]), path: Some("/_healthz"), port: Int(8080), scheme: Some("HTTP") }), initial_delay_seconds: Some(10), period_seconds: Some(10), success_threshold: Some(1), tcp_socket: None, termination_grace_period_seconds: None, timeout_seconds: Some(1) }), resources: Some(ResourceRequirements { limits: Some({"cpu": Quantity("200m"), "memory": Quantity("128Mi")}), requests: Some({"cpu": Quantity("100m"), "memory": Quantity("64Mi")}) }), security_context: None, startup_probe: None, stdin: None, stdin_once: None, termination_message_path: Some("/dev/termination-log"), termination_message_policy: Some("File"), tty: None, volume_devices: None, volume_mounts: Some([VolumeMount { mount_path: "/var/run/secrets/kubernetes.io/serviceaccount", mount_propagation: None, name: "default-token-f72m5", read_only: Some(true), sub_path: None, sub_path_expr: None }]), working_dir: None }], dns_config: None, dns_policy: Some("ClusterFirst"), enable_service_links: Some(true), ephemeral_containers: None, host_aliases: None, host_ipc: None, host_network: None, host_pid: None, hostname: None, image_pull_secrets: None, init_containers: None, node_name: Some("gke-hello-hipster-default-pool-9e6f6ffb-q16l"), node_selector: None, overhead: None, preemption_policy: Some("PreemptLowerPriority"), priority: Some(0), priority_class_name: None, readiness_gates: None, restart_policy: Some("Always"), runtime_class_name: None, scheduler_name: Some("default-scheduler"), security_context: Some(PodSecurityContext { fs_group: None, fs_group_change_policy: None, run_as_group: None, run_as_non_root: None, run_as_user: None, se_linux_options: None, seccomp_profile: None, supplemental_groups: None, sysctls: None, windows_options: None }), service_account: Some("default"), service_account_name: Some("default"), set_hostname_as_fqdn: None, share_process_namespace: None, subdomain: None, termination_grace_period_seconds: Some(30), tolerations: Some([Toleration { effect: Some("NoExecute"), key: Some("node.kubernetes.io/not-ready"), operator: Some("Exists"), toleration_seconds: Some(300), value: None }, Toleration { effect: Some("NoExecute"), key: Some("node.kubernetes.io/unreachable"), operator: Some("Exists"), toleration_seconds: Some(300), value: None }]), topology_spread_constraints: None, volumes: Some([Volume { aws_elastic_block_store: None, azure_disk: None, azure_file: None, cephfs: None, cinder: None, config_map: None, csi: None, downward_api: None, empty_dir: None, ephemeral: None, fc: None, flex_volume: None, flocker: None, gce_persistent_disk: None, git_repo: None, glusterfs: None, host_path: None, iscsi: None, name: "default-token-f72m5", nfs: None, persistent_volume_claim: None, photon_persistent_disk: None, portworx_volume: None, projected: None, quobyte: None, rbd: None, scale_io: None, secret: Some(SecretVolumeSource { default_mode: Some(420), items: None, optional: None, secret_name: Some("default-token-f72m5") }), storageos: None, vsphere_volume: None }]) }), status: Some(PodStatus { conditions: None, container_statuses: None, ephemeral_container_statuses: None, host_ip: None, init_container_statuses: None, message: Some("Pod Node didn't have enough resource: cpu, requested: 100, used: 931, capacity: 940"), nominated_node_name: None, phase: Some("Failed"), pod_ip: None, pod_ips: None, qos_class: None, reason: Some("OutOfcpu"), start_time: Some(Time(2021-04-27T10:14:48Z)) }) } }`,
[  626s]  right: `KubePod { namespace: "default", name: "frontend-5c4745dfdb-6k8wf", ready: (0, 0), status: "OutOfcpu", restarts: 0, cpu: "", mem: "", age: "127w6d19h", containers: [KubeContainer { name: "server", image: "gcr.io/google-samples/microservices-demo/frontend:v0.2.2", ready: "false", status: "<none>", restarts: 0, liveliness_probe: true, readiness_probe: true, ports: "8080", age: "127w6d19h", pod_name: "frontend-5c4745dfdb-6k8wf", init: false, k8s_obj: None }], k8s_obj: Pod { metadata: ObjectMeta { annotations: Some({"sidecar.istio.io/rewriteAppHTTPProbers": "true"}), cluster_name: None, creation_timestamp: Some(Time(2021-04-27T10:14:48Z)), deletion_grace_period_seconds: None, deletion_timestamp: None, finalizers: None, generate_name: Some("frontend-5c4745dfdb-"), generation: None, labels: Some({"app": "frontend", "pod-template-hash": "5c4745dfdb"}), managed_fields: Some([]), name: Some("frontend-5c4745dfdb-6k8wf"), namespace: Some("default"), owner_references: Some([OwnerReference { api_version: "apps/v1", block_owner_deletion: Some(true), controller: Some(true), kind: "ReplicaSet", name: "frontend-5c4745dfdb", uid: "0177c475-1b94-424a-bdee-a2f56b071c19" }]), resource_version: Some("2362"), self_link: Some("/api/v1/namespaces/default/pods/frontend-5c4745dfdb-6k8wf"), uid: Some("7f6517f6-e0ec-486b-8971-c3a71075f913") }, spec: Some(PodSpec { active_deadline_seconds: None, affinity: None, automount_service_account_token: None, containers: [Container { args: None, command: None, env: Some([EnvVar { name: "PORT", value: Some("8080"), value_from: None }, EnvVar { name: "PRODUCT_CATALOG_SERVICE_ADDR", value: Some("productcatalogservice:3550"), value_from: None }, EnvVar { name: "CURRENCY_SERVICE_ADDR", value: Some("currencyservice:7000"), value_from: None }, EnvVar { name: "CART_SERVICE_ADDR", value: Some("cartservice:7070"), value_from: None }, EnvVar { name: "RECOMMENDATION_SERVICE_ADDR", value: Some("recommendationservice:8080"), value_from: None }, EnvVar { name: "SHIPPING_SERVICE_ADDR", value: Some("shippingservice:50051"), value_from: None }, EnvVar { name: "CHECKOUT_SERVICE_ADDR", value: Some("checkoutservice:5050"), value_from: None }, EnvVar { name: "AD_SERVICE_ADDR", value: Some("adservice:9555"), value_from: None }, EnvVar { name: "ENV_PLATFORM", value: Some("gcp"), value_from: None }]), env_from: None, image: Some("gcr.io/google-samples/microservices-demo/frontend:v0.2.2"), image_pull_policy: Some("IfNotPresent"), lifecycle: None, liveness_probe: Some(Probe { exec: None, failure_threshold: Some(3), http_get: Some(HTTPGetAction { host: None, http_headers: Some([HTTPHeader { name: "Cookie", value: "shop_session-id=x-liveness-probe" }]), path: Some("/_healthz"), port: Int(8080), scheme: Some("HTTP") }), initial_delay_seconds: Some(10), period_seconds: Some(10), success_threshold: Some(1), tcp_socket: None, termination_grace_period_seconds: None, timeout_seconds: Some(1) }), name: "server", ports: Some([ContainerPort { container_port: 8080, host_ip: None, host_port: None, name: None, protocol: Some("TCP") }]), readiness_probe: Some(Probe { exec: None, failure_threshold: Some(3), http_get: Some(HTTPGetAction { host: None, http_headers: Some([HTTPHeader { name: "Cookie", value: "shop_session-id=x-readiness-probe" }]), path: Some("/_healthz"), port: Int(8080), scheme: Some("HTTP") }), initial_delay_seconds: Some(10), period_seconds: Some(10), success_threshold: Some(1), tcp_socket: None, termination_grace_period_seconds: None, timeout_seconds: Some(1) }), resources: Some(ResourceRequirements { limits: Some({"cpu": Quantity("200m"), "memory": Quantity("128Mi")}), requests: Some({"cpu": Quantity("100m"), "memory": Quantity("64Mi")}) }), security_context: None, startup_probe: None, stdin: None, stdin_once: None, termination_message_path: Some("/dev/termination-log"), termination_message_policy: Some("File"), tty: None, volume_devices: None, volume_mounts: Some([VolumeMount { mount_path: "/var/run/secrets/kubernetes.io/serviceaccount", mount_propagation: None, name: "default-token-f72m5", read_only: Some(true), sub_path: None, sub_path_expr: None }]), working_dir: None }], dns_config: None, dns_policy: Some("ClusterFirst"), enable_service_links: Some(true), ephemeral_containers: None, host_aliases: None, host_ipc: None, host_network: None, host_pid: None, hostname: None, image_pull_secrets: None, init_containers: None, node_name: Some("gke-hello-hipster-default-pool-9e6f6ffb-q16l"), node_selector: None, overhead: None, preemption_policy: Some("PreemptLowerPriority"), priority: Some(0), priority_class_name: None, readiness_gates: None, restart_policy: Some("Always"), runtime_class_name: None, scheduler_name: Some("default-scheduler"), security_context: Some(PodSecurityContext { fs_group: None, fs_group_change_policy: None, run_as_group: None, run_as_non_root: None, run_as_user: None, se_linux_options: None, seccomp_profile: None, supplemental_groups: None, sysctls: None, windows_options: None }), service_account: Some("default"), service_account_name: Some("default"), set_hostname_as_fqdn: None, share_process_namespace: None, subdomain: None, termination_grace_period_seconds: Some(30), tolerations: Some([Toleration { effect: Some("NoExecute"), key: Some("node.kubernetes.io/not-ready"), operator: Some("Exists"), toleration_seconds: Some(300), value: None }, Toleration { effect: Some("NoExecute"), key: Some("node.kubernetes.io/unreachable"), operator: Some("Exists"), toleration_seconds: Some(300), value: None }]), topology_spread_constraints: None, volumes: Some([Volume { aws_elastic_block_store: None, azure_disk: None, azure_file: None, cephfs: None, cinder: None, config_map: None, csi: None, downward_api: None, empty_dir: None, ephemeral: None, fc: None, flex_volume: None, flocker: None, gce_persistent_disk: None, git_repo: None, glusterfs: None, host_path: None, iscsi: None, name: "default-token-f72m5", nfs: None, persistent_volume_claim: None, photon_persistent_disk: None, portworx_volume: None, projected: None, quobyte: None, rbd: None, scale_io: None, secret: Some(SecretVolumeSource { default_mode: Some(420), items: None, optional: None, secret_name: Some("default-token-f72m5") }), storageos: None, vsphere_volume: None }]) }), status: Some(PodStatus { conditions: None, container_statuses: None, ephemeral_container_statuses: None, host_ip: None, init_container_statuses: None, message: Some("Pod Node didn't have enough resource: cpu, requested: 100, used: 931, capacity: 940"), nominated_node_name: None, phase: Some("Failed"), pod_ip: None, pod_ips: None, qos_class: None, reason: Some("OutOfcpu"), start_time: Some(Time(2021-04-27T10:14:48Z)) }) } }`', src/app/pods.rs:657:5
[  626s] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[  626s] 
[  626s] 
[  626s] failures:
[  626s]     app::pods::tests::test_pod_from_api
[  626s] 
[  626s] test result: FAILED. 59 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s

The builds are done without any network connectivity, to ensure a pristine build environment. I could exclude the test for now, but wanted to let you know in case this is something that needs to be fixed.

Builds are using rust and cargo 1.72.

If you need more details, please feel free to reach out.

@deepu105
Copy link
Contributor

seems like age mismatch age: "127w6d18h" vs age: "127w6d19h" sometimes the failure is one time occurance else you might want to see why the time changes

@deepu105
Copy link
Contributor

deepu105 commented Jan 8, 2024

did you manage to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants