Skip to content

Commit

Permalink
Merge branch 'release-1.149.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
niksv committed Dec 7, 2023
2 parents 3a8d487 + b18b107 commit e582c53
Show file tree
Hide file tree
Showing 80 changed files with 1,411 additions and 2,865 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
# Changelog
## v1.149.0 (07/12/2023)

### Bug Fixes:
- [#5489](https://github.com/telstra/open-kilda/pull/5489) Improve dump payload format to not display empty protected path objects. (Issue: [#5368](https://github.com/telstra/open-kilda/issues/5368))
- [#5490](https://github.com/telstra/open-kilda/pull/5490) HA-Flow: move history dumps to the place where status of flow and paths are already set. (Issue: [#5371](https://github.com/telstra/open-kilda/issues/5371))
- [#5495](https://github.com/telstra/open-kilda/pull/5495) open-kilda-4485 [GUI] missing permission validation on the 'useractivity' page (Issue: [#4485](https://github.com/telstra/open-kilda/issues/4485)) [**gui**]
- [#5497](https://github.com/telstra/open-kilda/pull/5497) Simple flow: move saving history dumps so that they saved before or after the IN_PROGRESS state (Issue: [#5373](https://github.com/telstra/open-kilda/issues/5373))
- [#5500](https://github.com/telstra/open-kilda/pull/5500) Enable saving dumps before and after on HA-Flow path swap operation.

### Improvements:
- [#5505](https://github.com/telstra/open-kilda/pull/5505) [TEST] Fixed flaky Y-Flow delete metod [**tests**]
- [#5509](https://github.com/telstra/open-kilda/pull/5509) Make writing data into OTSDB optional
- [#5382](https://github.com/telstra/open-kilda/pull/5382) Remove multi table from rule manager and DB
- [#5492](https://github.com/telstra/open-kilda/pull/5492) GUI: Add inner vlans into flows/add-new page (Issue: [#5296](https://github.com/telstra/open-kilda/issues/5296)) [**gui**]
- [#5498](https://github.com/telstra/open-kilda/pull/5498) #5390: [TEST] Prevent one way to false fail Flow Monitoring test (Issues: [#5390](https://github.com/telstra/open-kilda/issues/5390) [#5390](https://github.com/telstra/open-kilda/issues/5390)) [**tests**]
- [#5503](https://github.com/telstra/open-kilda/pull/5503) [TEST]: Storm: Disabling test that caused topology deletion issue [**tests**]

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

### Affected Components:
history

### Upgrade notes:
OrientDB schema have been changed in this release. You need to apply schema migration. Please follow [migration instructions](https://github.com/telstra/open-kilda/tree/develop/docker/db-migration/migrations).

---

## v1.148.0 (04/12/2023)

Expand Down
4 changes: 4 additions & 0 deletions confd/templates/base-storm-topology/topology.properties.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ zookeeper.reconnect_delay={{ getv "/kilda_zookeeper_reconnect_delay_ms"}}
persistence.implementation.default = {{ getv "/kilda_persistence_default_implementation" }}
persistence.implementation.area.history = {{ getv "/kilda_persistence_history_implementation" }}

{{if getv "/kilda_opentsdb_hosts"}}
opentsdb.target.opentsdb = http://{{ getv "/kilda_opentsdb_hosts" }}:{{ getv "/kilda_opentsdb_port" }}
{{else}}
opentsdb.target.opentsdb =
{{end}}
{{if getv "/kilda_victoriametrics_host"}}
opentsdb.target.victoriametrics = http://{{ getv "/kilda_victoriametrics_host" }}:{{ getv "/kilda_victoriametrics_write_port" }}{{ getv "/kilda_victoriametrics_path" }}
{{else}}
Expand Down
74 changes: 74 additions & 0 deletions docker/db-migration/migrations/031-remove-multi-table-fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
databaseChangeLog:
- changeSet:
id: tag
author: snikitin
changes:
- tagDatabase:
tag: 031-remove-multi-table-fields
- changeSet:
id: remove_multi_table_fields
author: snikitin
preConditions:
- onFail: HALT
- onFailMessage: "Failed preconditions for migration '031-remove-multi-table-fields'.\n
\n
Before run this migration you must be sure that values of all following fields are 'true':\n
1. switch_properties.multi_table\n
2. flow_path.src_with_multi_table\n
3. flow_path.dst_with_multi_table\n
4. path_segment.src_with_multi_table\n
5. path_segment.dst_with_multi_table\n
6. flow_mirror_path.egress_with_multi_table\n"
- sqlCheck:
expectedResult: 0
sql: "SELECT COUNT(*) FROM switch_properties WHERE multi_table = false"
- sqlCheck:
expectedResult: 0
sql: "SELECT COUNT(*) FROM flow_path WHERE src_with_multi_table = false"
- sqlCheck:
expectedResult: 0
sql: "SELECT COUNT(*) FROM flow_path WHERE dst_with_multi_table = false"
- sqlCheck:
expectedResult: 0
sql: "SELECT COUNT(*) FROM path_segment WHERE src_with_multi_table = false"
- sqlCheck:
expectedResult: 0
sql: "SELECT COUNT(*) FROM path_segment WHERE dst_with_multi_table = false"
- sqlCheck:
expectedResult: 0
sql: "SELECT COUNT(*) FROM flow_mirror_path WHERE egress_with_multi_table = false"
comment: "We have to put all changes into one changelog, because databaseChangeLog level preconditions are related
to all changeSets in the root.yaml, not only to the current changeLog. Also we can not have one precondition for
each table changeSet because whole remove changes must be transactional."
changes:
- sql: "DROP INDEX flow_path.src_with_multi_table IF EXISTS"
- sql: "DROP INDEX flow_path.dst_with_multi_table IF EXISTS"
- sql: "DROP PROPERTY flow_path.src_with_multi_table IF EXISTS"
- sql: "DROP PROPERTY flow_path.dst_with_multi_table IF EXISTS"
- sql: "UPDATE flow_path REMOVE src_with_multi_table"
- sql: "UPDATE flow_path REMOVE dst_with_multi_table"

- sql: "UPDATE path_segment REMOVE src_with_multi_table"
- sql: "UPDATE path_segment REMOVE dst_with_multi_table"

- sql: "UPDATE flow_mirror_path REMOVE egress_with_multi_table"

- sql: "UPDATE switch_properties REMOVE multi_table"

- sql: "UPDATE kilda_configuration REMOVE use_multi_table"
rollback:
- sql: "UPDATE kilda_configuration SET use_multi_table = true"

- sql: "UPDATE switch_properties SET multi_table = true"

- sql: "UPDATE flow_mirror_path SET egress_with_multi_table = true"

- sql: "UPDATE path_segment SET src_with_multi_table = true"
- sql: "UPDATE path_segment SET dst_with_multi_table = true"

- sql: "CREATE PROPERTY flow_path.src_with_multi_table IF NOT EXISTS BOOLEAN"
- sql: "CREATE PROPERTY flow_path.dst_with_multi_table IF NOT EXISTS BOOLEAN"
- sql: "UPDATE flow_path SET src_with_multi_table = true"
- sql: "UPDATE flow_path SET dst_with_multi_table = true"
- sql: "CREATE INDEX flow_path.src_with_multi_table IF NOT EXISTS NOTUNIQUE_HASH_INDEX"
- sql: "CREATE INDEX flow_path.dst_with_multi_table IF NOT EXISTS NOTUNIQUE_HASH_INDEX"
3 changes: 3 additions & 0 deletions docker/db-migration/migrations/root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ databaseChangeLog:
- include:
relativeToChangelogFile: true
file: 030-ensure-all-objects-are-multi-table.yaml
- include:
relativeToChangelogFile: true
file: 031-remove-multi-table-fields.yaml
7 changes: 7 additions & 0 deletions src-gui/ui/src/app/common/services/flows.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,11 @@ export class FlowsService {
return this.httpClient.get<any>(`${environment.apiEndPoint}/flows/${flowid}/status`);
}

getVlansForFlow() {
return Array.from({ length: 4096 }, (v, k) => {
return { label: (k).toString(), value: (k).toString() };
});
}


}
18 changes: 18 additions & 0 deletions src-gui/ui/src/app/modules/flows/flow-add/flow-add.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ <h6 class="card-title card-custom-title">SOURCE DETAILS</h6>
</div>
</div>
</div>
<div class='form-group row'>
<label class='col-sm-3 col-form-label'>Inner Vlan:</label>
<div class='col-sm-6'>
<ng-select [virtualScroll]="virtualScrollFlag" searchable="true" dropdownPosition="bottom" placeholder="Select source inner VLAN" formControlName="source_inner_vlan" [items]="vlanPorts" bindLabel="label" bindValue="value"></ng-select>
<div *ngIf="submitted && f.source_inner_vlan.errors" class="invalid-feedback">
<div *ngIf="f.source_inner_vlan.errors.required">Please select source inner VLAN</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -200,6 +209,15 @@ <h6 class="card-title card-custom-title">DESTINATION DETAILS</h6>
</div>
</div>
</div>
<div class='form-group row'>
<label class='col-sm-3 col-form-label'>Inner Vlan:</label>
<div class='col-sm-6'>
<ng-select [virtualScroll]="virtualScrollFlag" searchable="true" dropdownPosition="bottom" placeholder="Select destination inner VLAN" formControlName="target_inner_vlan" [items]="vlanPorts" bindLabel="label" bindValue="value"></ng-select>
<div *ngIf="submitted && f.target_inner_vlan.errors" class="invalid-feedback">
<div *ngIf="f.target_inner_vlan.errors.required">Please select destination inner VLAN</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
19 changes: 11 additions & 8 deletions src-gui/ui/src/app/modules/flows/flow-add/flow-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class FlowAddComponent implements OnInit {
switches: Select2Data = [];
sourceSwitches: Select2Data = [];
targetSwitches: Select2Data = [];
enableSearch: Number = 1;
sourcePorts = [];
mainSourcePorts = [];
targetPorts = [];
Expand Down Expand Up @@ -80,9 +79,11 @@ export class FlowAddComponent implements OnInit {
source_switch: [null, Validators.required],
source_port: [null, Validators.required],
source_vlan: ['0'],
source_inner_vlan: ['0'],
target_switch: [null, Validators.required],
target_port: [null, Validators.required],
target_vlan: ['0'],
target_inner_vlan: ['0'],
diverse_flowid: [null],
allocate_protected_path: [null],
ignore_bandwidth: [null],
Expand All @@ -92,9 +93,7 @@ export class FlowAddComponent implements OnInit {
max_latency_tier2: ['']
});

this.vlanPorts = Array.from({ length: 4095 }, (v, k) => {
return { label: k.toString() , value: k.toString() };
});
this.vlanPorts = this.flowService.getVlansForFlow();
this.getflowList();
this.getSwitchList();
}
Expand Down Expand Up @@ -152,9 +151,11 @@ export class FlowAddComponent implements OnInit {
if (switchType == 'source_switch') {
this.flowAddForm.controls['source_port'].setValue(null);
this.flowAddForm.controls['source_vlan'].setValue('0');
this.flowAddForm.controls['source_inner_vlan'].setValue('0');
} else {
this.flowAddForm.controls['target_port'].setValue(null);
this.flowAddForm.controls['target_vlan'].setValue('0');
this.flowAddForm.controls['target_inner_vlan'].setValue('0');
}

this.loaderService.show('Loading Ports');
Expand Down Expand Up @@ -194,9 +195,11 @@ export class FlowAddComponent implements OnInit {
if (switchType == 'source_switch') {
this.flowAddForm.controls['source_port'].setValue(null);
this.flowAddForm.controls['source_vlan'].setValue('0');
this.flowAddForm.controls['source_inner_vlan'].setValue('0');
} else {
this.flowAddForm.controls['target_port'].setValue(null);
this.flowAddForm.controls['target_vlan'].setValue('0');
this.flowAddForm.controls['target_inner_vlan'].setValue('0');
}
}
}
Expand All @@ -212,13 +215,13 @@ export class FlowAddComponent implements OnInit {
'switch_id': this.flowAddForm.controls['source_switch'].value,
'port_number': this.flowAddForm.controls['source_port'].value,
'vlan_id': this.flowAddForm.controls['source_vlan'].value,
'inner_vlan_id': 0,
'inner_vlan_id': this.flowAddForm.controls['source_inner_vlan'].value,
},
destination: {
'switch_id': this.flowAddForm.controls['target_switch'].value,
'port_number': this.flowAddForm.controls['target_port'].value,
'vlan_id': this.flowAddForm.controls['target_vlan'].value,
'inner_vlan_id': 0,
'inner_vlan_id': this.flowAddForm.controls['target_inner_vlan'].value,
},
'flow_id': this.flowAddForm.controls['flowname'].value,
'maximum_bandwidth': this.flowAddForm.controls['maximum_bandwidth'].value,
Expand Down Expand Up @@ -278,10 +281,10 @@ export class FlowAddComponent implements OnInit {
getVLAN(type) {
if (type == 'source_port') {
this.flowAddForm.controls['source_vlan'].setValue('0');
this.flowAddForm.controls['source_inner_vlan'].setValue('0');
} else {
this.flowAddForm.controls['target_vlan'].setValue('0');
this.flowAddForm.controls['target_inner_vlan'].setValue('0');
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ToastrService } from 'ngx-toastr';
import { SwitchService } from '../../../common/services/switch.service';
import { SwitchidmaskPipe } from '../../../common/pipes/switchidmask.pipe';
import { LoaderService } from '../../../common/services/loader.service';
import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { OtpComponent } from '../../../common/components/otp/otp.component';
import { Location } from '@angular/common';
import { Title } from '@angular/platform-browser';
Expand All @@ -28,7 +28,6 @@ export class FlowEditComponent implements OnInit {
switches: any = [];
sourceSwitches: Array<any>;
targetSwitches: Array<any>;
enableSearch: Number = 1;
sourcePorts = [];
mainSourcePorts = [];
targetPorts = [];
Expand Down Expand Up @@ -92,7 +91,7 @@ export class FlowEditComponent implements OnInit {
max_latency_tier2: ['']
});

this.vlanPorts = this.getVlans();
this.vlanPorts = this.flowService.getVlansForFlow();
const flowId: string = this.route.snapshot.paramMap.get('id');
const filterFlag = localStorage.getItem('filterFlag') || 'controller';

Expand Down Expand Up @@ -396,10 +395,4 @@ export class FlowEditComponent implements OnInit {
this.flowEditForm.controls['target_inner_vlan'].setValue('0');
}
}

getVlans() {
return Array.from({ length: 4095 }, (v, k) => {
return { label: (k).toString(), value: (k).toString() };
});
}
}
Loading

0 comments on commit e582c53

Please sign in to comment.