summaryrefslogtreecommitdiffstats
path: root/puppet/services/ovn-dbs.yaml
blob: 2b98008b142e07bbecfd7e94b76e8799325fe269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
heat_template_version: pike

description: >
  OVN databases configured with puppet

parameters:
  ServiceData:
    default: {}
    description: Dictionary packing service data
    type: json
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  DefaultPasswords:
    default: {}
    type: json
  RoleName:
    default: ''
    description: Role name on which the service is applied
    type: string
  RoleParameters:
    default: {}
    description: Parameters specific to the role
    type: json
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  OVNNorthboundServerPort:
    description: Port of the OVN Northbound DB server
    type: number
    default: 6641
  OVNSouthboundServerPort:
    description: Port of the OVN Southbound DB server
    type: number
    default: 6642

outputs:
  role_data:
    description: Role data for the OVN northd service
    value:
      service_name: ovn_dbs
      config_settings:
          ovn::northbound::port: {get_param: OVNNorthboundServerPort}
          ovn::southbound::port: {get_param: OVNSouthboundServerPort}
          ovn::northd::dbs_listen_ip: {get_param: [ServiceNetMap, OvnDbsNetwork]}
          tripleo::haproxy::ovn_dbs_manage_lb: true
          tripleo.ovn_dbs.firewall_rules:
            '121 OVN DB server ports':
              proto: 'tcp'
              dport:
                - {get_param: OVNNorthboundServerPort}
                - {get_param: OVNSouthboundServerPort}
      step_config: |
        include ::tripleo::profile::base::neutron::ovn_northd
      upgrade_tasks:
        - name: Check if ovn_northd is deployed
          command: systemctl is-enabled ovn-northd
          tags: common
          ignore_errors: True
          register: ovn_northd_enabled
        - name: "PreUpgrade step0,validation: Check service ovn-northd is running"
          shell: /usr/bin/systemctl show 'ovn-northd' --property ActiveState | grep '\bactive\b'
          when: ovn_northd_enabled.rc == 0
          tags: step0,validation
        - name: Stop ovn-northd service
          tags: step1
          when: ovn_northd_enabled.rc == 0
          service: name=ovn-northd state=stopped
ass="p">(max_col, "Max (us)", 20); avg_col = display_table_add_col(lat); display_column_init(avg_col, "Avg (us)", 20); stddev_col = display_table_add_col(lat); display_column_init(stddev_col, "Stddev (us)", 20); display_table_init(acc, "Accuracy "); used_col = display_table_add_col(acc); display_column_init(used_col, "Used Packets (%)", 16); accuracy_limit_col = display_table_add_col(acc); display_column_init(accuracy_limit_col, "limit (us)", 16); display_table_init(other, "Other"); lost_col = display_table_add_col(other); display_column_init(lost_col, "Lost Packets", 16); display_page_draw_frame(&display_page_latency, n_latency); for (uint16_t i = 0; i < n_latency; ++i) { uint32_t lcore_id = stats_latency_get_core_id(i); uint32_t task_id = stats_latency_get_task_id(i); struct task_args *targ = &lcore_cfg[lcore_id].targs[task_id]; display_column_print(core_col, i, "%2u/%1u", lcore_id, task_id); display_column_port_ring(port_col, i, targ->rx_port_queue, targ->nb_rxports, targ->rx_rings, targ->nb_rxrings); } } #define AFTER_POINT 1000000 static void display_stats_latency_entry(int row, struct stats_latency *stats_latency) { struct time_unit_err avg = stats_latency->avg; struct time_unit_err min = stats_latency->min; struct time_unit_err max = stats_latency->max; struct time_unit_err stddev = stats_latency->stddev; struct time_unit accuracy_limit = stats_latency->accuracy_limit; uint32_t used = 0; if (stats_latency->tot_all_packets) used = stats_latency->tot_packets * (100 * AFTER_POINT) / stats_latency->tot_all_packets; char dst[32]; if (stats_latency->tot_packets) { display_column_print(min_col, row, "%s", print_time_unit_err_usec(dst, &min)); display_column_print(max_col, row, "%s", print_time_unit_err_usec(dst, &max)); display_column_print(avg_col, row, "%s", print_time_unit_err_usec(dst, &avg)); display_column_print(stddev_col, row, "%s", print_time_unit_err_usec(dst, &stddev)); } else { display_column_print(min_col, row, "%s", "N/A"); display_column_print(max_col, row, "%s", "N/A"); display_column_print(avg_col, row, "%s", "N/A"); display_column_print(stddev_col, row, "%s", "N/A"); } display_column_print(accuracy_limit_col, row, "%s", print_time_unit_usec(dst, &accuracy_limit)); display_column_print(lost_col, row, "%16"PRIu64"", stats_latency->lost_packets); display_column_print(used_col, row, "%3u.%06u", used / AFTER_POINT, used % AFTER_POINT); } static void display_latency_draw_stats(struct screen_state *screen_state) { const uint32_t n_latency = stats_get_n_latency(); struct stats_latency *stats_latency; for (uint16_t i = 0; i < n_latency; ++i) { if (screen_state->toggle == 0) stats_latency = stats_latency_get(i); else stats_latency = stats_latency_tot_get(i); display_stats_latency_entry(i, stats_latency); } } static int display_latency_get_height(void) { return stats_get_n_latency(); } static struct display_screen display_screen_latency = { .draw_frame = display_latency_draw_frame, .draw_stats = display_latency_draw_stats, .get_height = display_latency_get_height, .title = "latency", }; struct display_screen *display_latency(void) { return &display_screen_latency; }