Skip to content

Commit

Permalink
merge conflict fixes related to changelog.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ichupin committed Jan 29, 2024
2 parents 661f352 + 52165f9 commit 6e1c507
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 22 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Changelog
## v1.153.0 (29/01/2024)

### Improvements:
- [#5544](https://github.com/telstra/open-kilda/pull/5544) Avoid non-existing directory warnings on WFM container creation
- [#5546](https://github.com/telstra/open-kilda/pull/5546) 5390: [TEST]: Fix flaky protected path test [**tests**]

### Other changes:
- [#5540](https://github.com/telstra/open-kilda/pull/5540) 5521: [TEST] Update History validation test (Issue: [#5221](https://github.com/telstra/open-kilda/issues/5221)) [**tests**]

For the complete list of changes, check out [the commit log](https://github.com/telstra/open-kilda/compare/v1.152.0...v1.153.0).

---

## v1.152.0 (19/01/2024)

Expand Down
4 changes: 1 addition & 3 deletions docker/base/kilda-base-lab-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ RUN apt update \
gcc \
build-essential \
automake \
&& pip3 install setuptools==45.2.0 \
&& pip3 install wheel==0.34.2 \
&& pip3 install tox==3.14.4 \
&& pip3 install setuptools==45.2.0 wheel==0.34.2 tox==3.14.4\
&& cd /root \
&& wget https://github.com/kilda/ovs/archive/refs/tags/${OVS_VERSION}.tar.gz \
&& tar -xvf ${OVS_VERSION}.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion docker/wfm/app/deploy_all_topologies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for TOPOLOGY in $(find . -name "*-topology" -type d); do
TOPOLOGY_JAR=$(ls -1 /app/${TOPOLOGY_NAME}-storm-topology/libs/ | grep -v "\-original" | head -1)
COMMA_SEPARATED_DEPENDENCY_LIST=""

for DEPENDENCY_JAR in $(ls -1 ${TOPOLOGY}/dependency-jars);
for DEPENDENCY_JAR in $([[ -d ${TOPOLOGY}/dependency-jars ]] && ls -1 ${TOPOLOGY}/dependency-jars);
do
COMMA_SEPARATED_DEPENDENCY_LIST="${COMMA_SEPARATED_DEPENDENCY_LIST:+$COMMA_SEPARATED_DEPENDENCY_LIST,}/app/${TOPOLOGY_NAME}-storm-topology/dependency-jars/${DEPENDENCY_JAR}"
done
Expand Down
2 changes: 1 addition & 1 deletion docker/wfm/app/deploy_single_topology.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TOPOLOGY_DEFINITION=${5:-"/app/${TOPOLOGY_NAME}-storm-topology/topology-definiti
TOPOLOGY_JAR=$(ls -1 /app/${TOPOLOGY_NAME}-storm-topology/libs/ | grep -v "\-original" | head -1)
COMMA_SEPARATED_DEPENDENCY_LIST=""

for DEPENDENCY_JAR in $(ls -1 /app/${TOPOLOGY_NAME}-storm-topology/dependency-jars/);
for DEPENDENCY_JAR in $([[ -d /app/${TOPOLOGY_NAME}-storm-topology/dependency-jars/ ]] && ls -1 /app/${TOPOLOGY_NAME}-storm-topology/dependency-jars/);
do
COMMA_SEPARATED_DEPENDENCY_LIST="${COMMA_SEPARATED_DEPENDENCY_LIST:+$COMMA_SEPARATED_DEPENDENCY_LIST,}/app/${TOPOLOGY_NAME}-storm-topology/dependency-jars/${DEPENDENCY_JAR}"
done
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.openkilda.functionaltests.error


import org.springframework.http.HttpStatus

import java.util.regex.Pattern

class InvalidRequestParametersExpectedError extends AbstractExpectedError{
final static HttpStatus statusCode = HttpStatus.BAD_REQUEST

InvalidRequestParametersExpectedError(String message, Pattern descriptionPattern) {
super(statusCode, message, descriptionPattern)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openkilda.functionaltests.spec.flows

import org.openkilda.functionaltests.error.InvalidRequestParametersExpectedError

import static org.openkilda.functionaltests.helpers.FlowHistoryConstants.PARTIAL_UPDATE_ACTION
import static org.openkilda.functionaltests.helpers.FlowHistoryConstants.PARTIAL_UPDATE_ONLY_IN_DB
import static org.openkilda.testing.Constants.FLOW_CRUD_TIMEOUT
Expand Down Expand Up @@ -325,11 +327,6 @@ class FlowHistorySpec extends HealthCheckSpecification {
params: [flowWithHistory, null, bigHistory[-2].timestamp, null],
expectedHistory: bigHistory[0..-2] //101
],
[
descr: "timeBefore > timeAfter returns empty results",
params: [flowWithHistory, bigHistory[2].timestamp, bigHistory[0].timestamp],
expectedHistory: []
],
[
descr: "Calling history for never existed flow returns empty results",
params: [NON_EXISTENT_FLOW_ID],
Expand All @@ -338,6 +335,18 @@ class FlowHistorySpec extends HealthCheckSpecification {
]
}

@Tags(LOW_PRIORITY)
def "Check history: timeBefore > timeAfter returns error"() {
when: "Request history with timeBefore > timeAfter returns error"
northbound.getFlowHistory(flowWithHistory, bigHistory[2].timestamp, bigHistory[0].timestamp)

then: "Error is returned"
def exc = thrown(HttpClientErrorException)
new InvalidRequestParametersExpectedError(
"Invalid 'timeFrom' and 'timeTo' arguments: ${bigHistory[2].timestamp} and ${bigHistory[0].timestamp + 1}",
~/'timeFrom' must be less than or equal to 'timeTo'/).matches(exc)
}

@Tags([LOW_PRIORITY])
def "Root cause is registered in flow history while rerouting"() {
given: "An active flow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ class FlowLoopSpec extends HealthCheckSpecification {
then: "Human readable error is returned" //system can't update the flow when it is down
def exc = thrown(HttpClientErrorException)
new FlowNotUpdatedExpectedError(~/Source switch $switchPair.src.dpId is not connected to the controller/).matches(exc)

then: "FlowLoop is not created"
!northbound.getFlow(flow.flowId).loopSwitchId

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import static org.openkilda.functionaltests.extension.tags.Tag.SMOKE_SWITCHES
import static org.openkilda.functionaltests.helpers.FlowHistoryConstants.REROUTE_ACTION
import static org.openkilda.functionaltests.helpers.FlowHistoryConstants.REROUTE_FAIL
import static org.openkilda.functionaltests.helpers.SwitchHelper.isDefaultMeter
import static org.openkilda.messaging.info.event.IslChangeType.FAILED
import static org.openkilda.model.MeterId.MAX_SYSTEM_RULE_METER_ID
import static org.openkilda.model.cookie.CookieBase.CookieType.SERVICE_OR_FLOW_SEGMENT
import static org.openkilda.testing.Constants.NON_EXISTENT_FLOW_ID
Expand Down Expand Up @@ -440,8 +441,9 @@ class ProtectedPathSpec extends HealthCheckSpecification {
status == FlowState.DEGRADED.toString()
flowStatusDetails.mainFlowPathStatus == "Up"
flowStatusDetails.protectedFlowPathStatus == "Down"
statusInfo == "Not enough bandwidth or no path found. Switch ${switchPair.getSrc().getDpId()} \
doesn't have links with enough bandwidth, Failed to find path with requested bandwidth=$flow.maximumBandwidth"
statusInfo =~ ~/Not enough bandwidth or no path found. Switch \
(${switchPair.getSrc().getDpId()}|${switchPair.getDst().getDpId()}) doesn't have links with enough bandwidth, \
Failed to find path with requested bandwidth=$flow.maximumBandwidth/
}
}
Expand Down Expand Up @@ -486,8 +488,14 @@ doesn't have links with enough bandwidth, Failed to find path with requested ban
it != originalProtectedPath }.collectMany { pathHelper.getInvolvedIsls(it) }
.findAll {!usedIsls.contains(it) }
.unique { a, b -> a == b || a == b.reversed ? 0 : 1 }
otherIsls.each {
antiflap.portDown(it.srcSwitch.dpId, it.srcPort)
withPool {
otherIsls.eachParallel {
antiflap.portDown(it.srcSwitch.dpId, it.srcPort)
}
}
Wrappers.wait(WAIT_OFFSET) {
def links = northbound.getAllLinks()
assert otherIsls.each {islUtils.getIslInfo(links, it).get().state == FAILED}
}
and: "Main flow path breaks"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1082,24 +1082,19 @@ switches"() {
new FlowEndpointsNotSwappedExpectedError(~/Not enough bandwidth or no path found/).matches(exc)
and: "All involved switches are valid"
/** https://github.com/telstra/open-kilda/issues/3770
Wrappers.wait(RULES_INSTALLATION_TIME) {
assert switchHelper.validate(involvedSwIds).isEmpty()
}
Boolean isTestCompleted = true
Boolean isTestCompleted = true **/
switchHelper.synchronize(involvedSwIds)
cleanup: "Restore topology and delete flows"
[flow1, flow2].each { it && flowHelper.deleteFlow(it.id) }
//https://github.com/telstra/open-kilda/issues/3770
switchHelper.synchronize(involvedSwIds)
broughtDownPorts.every { antiflap.portUp(it.switchId, it.portNo) }
Wrappers.wait(discoveryInterval + WAIT_OFFSET) {
northbound.getAllLinks().each { assert it.state != IslChangeType.FAILED }
}
if (!isTestCompleted) {
switchHelper.synchronize([flow1SwitchPair.src.dpId, flow1SwitchPair.dst.dpId,
flow2SwitchPair.src.dpId, flow2SwitchPair.dst.dpId]
.unique())
}
database.resetCosts(topology.isls)
}
Expand Down

0 comments on commit 6e1c507

Please sign in to comment.