summaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch')
-rw-r--r--patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch b/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch
new file mode 100644
index 00000000..bea8a059
--- /dev/null
+++ b/patches/fuel-plugin-ovs/0009-HACK-build-prebuilt-DEBs-src-bin-ver-mismatch.patch
@@ -0,0 +1,72 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 15 Sep 2016 19:41:58 +0200
+Subject: [PATCH] HACK: build: prebuilt DEBs: src/bin ver mismatch
+
+Our debian source version is not always in sync with the debian
+binaries versions, see related bug for a complete description of
+this issue.
+
+This is a temporary chance which should be dropped once the package
+versions are aligned.
+
+Related-bug: ARMBAND-89
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ ovs_build/build-ovs-armband-fetch.sh | 16 ++++++++++++----
+ ovs_build/build-ovs-nsh-dpdk.sh | 2 +-
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/ovs_build/build-ovs-armband-fetch.sh b/ovs_build/build-ovs-armband-fetch.sh
+index a810b93..8ab22cc 100755
+--- a/ovs_build/build-ovs-armband-fetch.sh
++++ b/ovs_build/build-ovs-armband-fetch.sh
+@@ -17,7 +17,7 @@ set -eux
+ # dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages
+ function armband_fetch() {
+ local name=$1
+- local ver=${2//\+/\\\+}
++ local src_ver=${2//\+/\\\+}
+ local repo_base_url=${3:-http://linux.enea.com/mos-repos/ubuntu/9.0}
+ local repo_Sources_url=${4:-dists/mos9.0-fuel-plugin-ovs/main/source/Sources}
+ local repo_Packages_url=${5:-dists/mos9.0-fuel-plugin-ovs/main/binary-arm64/Packages}
+@@ -30,16 +30,24 @@ function armband_fetch() {
+ wget -c "${repo_base_url}/${repo_Packages_url}"
+ fi
+
+- L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${ver})" \
++ L=$(grep -Pzo "(?s)(?<=^Package: ${name}\n^Binary: )(\N*?)(?=\n^Version: ${src_ver})" \
+ Sources | tr -d ',')
+ for deb_binary in ${L}; do
+- D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${ver}_.*?\.deb)" Packages) || true
++ # FIXME(armband): https://jira.opnfv.org/browse/ARMBAND-89
++ # Until we align source and binaries versions for nsh, convert on the fly
++ # e.g.: debian source 2.5.90~04.05-1.nsh+amos2 => debian binary 2.5.90-1.nsh
++ deb_ver=${src_ver}
++ if [[ ${deb_ver} == *~*-* ]]; then
++ deb_ver=${deb_ver//~*-/-}
++ deb_ver=${deb_ver%\\\+*}
++ fi
++ D=$(grep -Po "(?<=^Filename: )(.*?\/${deb_binary}_${deb_ver}_.*?\.deb)" Packages) || true
+ if [ -n "${D}" ]; then
+ wget -c "${repo_base_url}/${D}" && found=true
+ fi
+ done
+ if [ ${found} = false ]; then
+- echo "ERROR: Could not find DEBs for pkg/ver: ${name}/${ver}"
++ echo "ERROR: Could not find DEBs for pkg|src_ver|deb_ver: ${name}|${src_ver}|${deb_ver}"
+ exit 1
+ fi
+ }
+diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh
+index 9d8a837..aebcb94 100755
+--- a/ovs_build/build-ovs-nsh-dpdk.sh
++++ b/ovs_build/build-ovs-nsh-dpdk.sh
+@@ -12,7 +12,7 @@ DIR="$(dirname `readlink -f $0`)"
+ export DEB_BUILD_OPTIONS='parallel=8 nocheck'
+
+ # AArch64 specifics, repository base URL, debian build versions
+-AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90-1.nsh'}
++AARCH64_OVS_NSH_DEBV=${AARCH64_OVS_NSH_DEBV:-'2.5.90~04.05-1.nsh+amos2'}
+
+ # Keep track of native arch (BUILD_ARCH) and target arch(s) (UBUNTU_ARCH)
+ # All archs should be represented in `dpkg --print-architecture` format
/ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
heat_template_version: pike

description: >
  OpenStack containerized etcd services

parameters:
  DockerNamespace:
    description: namespace
    default: 'tripleoupstream'
    type: string
  DockerEtcdImage:
    description: image
    default: 'centos-binary-etcd:latest'
    type: string
  DockerEtcdConfigImage:
    description: The container image to use for the etcd config_volume
    default: 'centos-binary-etcd:latest'
    type: string
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    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
  EtcdInitialClusterToken:
    description: Initial cluster token for the etcd cluster during bootstrap.
    type: string
    hidden: true

resources:

  EtcdPuppetBase:
    type: ../../puppet/services/etcd.yaml
    properties:
      EndpointMap: {get_param: EndpointMap}
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}
      EtcdInitialClusterToken: {get_param: EtcdInitialClusterToken}

outputs:
  role_data:
    description: Role data for the etcd role.
    value:
      service_name: {get_attr: [EtcdPuppetBase, role_data, service_name]}
      step_config: &step_config
        list_join:
          - "\n"
          - - "['Etcd_key'].each |String $val| { noop_resource($val) }"
            - get_attr: [EtcdPuppetBase, role_data, step_config]
      config_settings:
        map_merge:
          - {get_attr: [EtcdPuppetBase, role_data, config_settings]}
          - etcd::manage_service: false
      # BEGIN DOCKER SETTINGS
      puppet_config:
        config_volume: etcd
        step_config: *step_config
        config_image: &etcd_config_image
          list_join:
            - '/'
            - [ {get_param: DockerNamespace}, {get_param: DockerEtcdConfigImage} ]
      kolla_config:
        /var/lib/kolla/config_files/etcd.json:
          command: /usr/bin/etcd --config-file /etc/etcd/etcd.yml
          config_files:
            - source: "/var/lib/kolla/config_files/src/*"
              dest: "/"
              merge: true
              preserve_properties: true
          permissions:
            - path: /var/lib/etcd
              owner: etcd:etcd
              recurse: true
      docker_config:
        step_2:
          etcd:
            image:
              list_join:
                - '/'
                - [ {get_param: DockerNamespace}, {get_param: DockerEtcdImage} ]
            net: host
            privileged: false
            restart: always
            volumes:
              - /var/lib/etcd:/var/lib/etcd
              - /etc/localtime:/etc/localtime:ro
              - /var/lib/kolla/config_files/etcd.json:/var/lib/kolla/config_files/config.json:ro
              - /var/lib/config-data/puppet-generated/etcd/:/var/lib/kolla/config_files/src:ro
            environment:
              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
      docker_puppet_tasks:
        # Etcd keys initialization occurs only on single node
        step_2:
          config_volume: 'etcd_init_tasks'
          puppet_tags: 'etcd_key'
          step_config: 'include ::tripleo::profile::base::etcd'
          config_image: *etcd_config_image
          volumes:
            - /var/lib/config-data/etcd/etc/etcd/:/etc/etcd:ro
            - /var/lib/etcd:/var/lib/etcd:ro
      host_prep_tasks:
        - name: create /var/lib/etcd
          file:
            path: /var/lib/etcd
            state: directory
      upgrade_tasks:
        - name: Stop and disable etcd service
          tags: step2
          service: name=etcd state=stopped enabled=no