Skip to content

Conversation

pmtk
Copy link
Member

@pmtk pmtk commented Nov 26, 2024

No description provided.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 26, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@pmtk: This pull request references USHIFT-4916 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 26, 2024
Copy link
Contributor

openshift-ci bot commented Nov 26, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2024
@pmtk pmtk marked this pull request as ready for review November 27, 2024 08:43
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2024
@openshift-ci openshift-ci bot requested review from agullon and eslutsky November 27, 2024 08:45
@pmtk
Copy link
Member Author

pmtk commented Nov 27, 2024

/test security

@pmtk
Copy link
Member Author

pmtk commented Nov 27, 2024

/retest

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 27, 2024

@pmtk: This pull request references USHIFT-4916 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Respective, existing implementation:

  • if [ "$(systemctl is-enabled microshift.service 2>/dev/null)" != "enabled" ] ; then
    echo "MicroShift service is not enabled. Exiting..."
    exit 0
    fi
  • echo "Waiting ${WAIT_TIMEOUT_SECS}s for MicroShift service to be active and not failed"
    if ! wait_for "${WAIT_TIMEOUT_SECS}" microshift_service_active ; then
    echo "Error: Timed out waiting for MicroShift service to be active"
    exit 1
    fi
  • function microshift_service_active() {
    local -r is_failed=$(systemctl is-failed microshift.service)
    local -r is_active=$(systemctl is-active microshift.service)
    # Terminate the script in case of a failed service - nothing to wait for
    if [ "${is_failed}" = "failed" ] ; then
    echo "Error: The microshift.service systemd unit is failed. Terminating..."
    kill -TERM ${SCRIPT_PID}
    fi
    # Check the service activity
    [ "${is_active}" = "active" ] && return 0
    return 1
    }
  • # Source Greenboot configuration file if it exists
    local conf_file=/etc/greenboot/greenboot.conf
    # shellcheck source=/dev/null
    [ -f "${conf_file}" ] && source ${conf_file}
    local grub_vars
    local boot_vars
    grub_vars=$(grub2-editenv - list | grep ^boot_ || true)
    boot_vars=$(set | grep -E '^GREENBOOT_|^MICROSHIFT_' || true)
    [ -z "${grub_vars}" ] && grub_vars="None"
    [ -z "${boot_vars}" ] && boot_vars="None"
  • function get_wait_timeout() {
    # Source Greenboot configuration file if it exists
    local conf_file=/etc/greenboot/greenboot.conf
    # shellcheck source=/dev/null
    [ -f "${conf_file}" ] && source ${conf_file}
    # Read and verify the wait timeout value, allowing for the [60..9999] range
    local base_timeout=${MICROSHIFT_WAIT_TIMEOUT_SEC:-300}
    local reSecs='^[1-9]{1}[0-9]{0,3}$'
    if [[ ! ${base_timeout} =~ ${reSecs} ]] ; then
    base_timeout=300
    >&2 echo "Could not parse MICROSHIFT_WAIT_TIMEOUT_SEC value '${MICROSHIFT_WAIT_TIMEOUT_SEC}': using '${base_timeout}' instead"
    fi
    if [[ ${base_timeout} -lt 60 ]] ; then
    base_timeout=60
    >&2 echo "MICROSHIFT_WAIT_TIMEOUT_SEC value '${MICROSHIFT_WAIT_TIMEOUT_SEC}' is less than 60: using '${base_timeout}' instead"
    fi
    # Read and verify the max boots value, allowing for the [1..9] range
    local max_boots=${GREENBOOT_MAX_BOOT_ATTEMPTS:-3}
    local reBoots='^[1-9]{1}$'
    if [[ ! ${max_boots} =~ ${reBoots} ]] ; then
    max_boots=3
    >&2 echo "GREENBOOT_MAX_BOOT_ATTEMPTS value '${GREENBOOT_MAX_BOOT_ATTEMPTS}' is not in the [1..9] range: using '${max_boots}' instead"
    fi
    # Update the wait timeout according to the boot counter.
    # The new wait timeout is a product of the timeout base and the number of boot attempts.
    local boot_counter
    boot_counter=$(grub2-editenv - list | grep ^boot_counter= | awk -F= '{print $2}')
    [ -z "${boot_counter}" ] && boot_counter=$(( max_boots - 1 ))
    local wait_timeout=$(( base_timeout * ( max_boots - boot_counter ) ))
    [ ${wait_timeout} -le 0 ] && wait_timeout=${base_timeout}
    echo "${wait_timeout}"
    }

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@pmtk
Copy link
Member Author

pmtk commented Nov 27, 2024

/retest

1 similar comment
@pmtk
Copy link
Member Author

pmtk commented Nov 28, 2024

/retest

@pmtk pmtk force-pushed the go-healthcheck/init branch 2 times, most recently from a20b858 to bb3b5bc Compare November 28, 2024 14:29
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 29, 2024

@pmtk: This pull request references USHIFT-4916 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Respective, existing implementation:

  • if [ "$(systemctl is-enabled microshift.service 2>/dev/null)" != "enabled" ] ; then
    echo "MicroShift service is not enabled. Exiting..."
    exit 0
    fi
  • echo "Waiting ${WAIT_TIMEOUT_SECS}s for MicroShift service to be active and not failed"
    if ! wait_for "${WAIT_TIMEOUT_SECS}" microshift_service_active ; then
    echo "Error: Timed out waiting for MicroShift service to be active"
    exit 1
    fi
  • function microshift_service_active() {
    local -r is_failed=$(systemctl is-failed microshift.service)
    local -r is_active=$(systemctl is-active microshift.service)
    # Terminate the script in case of a failed service - nothing to wait for
    if [ "${is_failed}" = "failed" ] ; then
    echo "Error: The microshift.service systemd unit is failed. Terminating..."
    kill -TERM ${SCRIPT_PID}
    fi
    # Check the service activity
    [ "${is_active}" = "active" ] && return 0
    return 1
    }

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@pmtk pmtk force-pushed the go-healthcheck/init branch 2 times, most recently from 60aaf2b to 2949a46 Compare November 29, 2024 15:54
@pmtk pmtk force-pushed the go-healthcheck/init branch from 2949a46 to 53bd849 Compare November 29, 2024 15:55
@pmtk pmtk force-pushed the go-healthcheck/init branch from 53bd849 to c513847 Compare November 29, 2024 15:55
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 29, 2024

@pmtk: This pull request references USHIFT-4916 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@pmtk
Copy link
Member Author

pmtk commented Dec 2, 2024

/test verify

1 similar comment
@pmtk
Copy link
Member Author

pmtk commented Dec 3, 2024

/test verify

Copy link
Contributor

@pacevedom pacevedom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2024
Copy link
Contributor

openshift-ci bot commented Dec 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacevedom, pmtk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ddc2e7f and 2 for PR HEAD c513847 in total

@pmtk
Copy link
Member Author

pmtk commented Dec 3, 2024

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 3, 2024
Copy link
Contributor

openshift-ci bot commented Dec 3, 2024

@pmtk: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@pmtk
Copy link
Member Author

pmtk commented Dec 4, 2024

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit c1f5947 into openshift:main Dec 4, 2024
19 checks passed
@pmtk pmtk deleted the go-healthcheck/init branch December 4, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants