Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @Carthaca @chuan137 @kpawar-sap @sumitarora2786 @crenduchinta88 @skook1
/.github/CODEOWNERS @Carthaca @chuan137
15 changes: 15 additions & 0 deletions custom-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
raven
paste
pyreloader
pytz

crc<7.0.0 # until https://github.com/schlitzered/pyredis/issues/10 has been fixed

git+https://github.com/sapcc/manila-extensions.git@master#egg=manila-extensions
git+https://github.com/sapcc/openstack-watcher-middleware.git#egg=watcher-middleware
git+https://github.com/sapcc/openstack-audit-middleware.git@master#egg=audit-middleware
git+https://github.com/sapcc/openstack-rate-limit-middleware.git#egg=rate-limit-middleware
git+https://github.com/sapcc/python-agentliveness.git#egg=agentliveness

# needs for osprofiler
# jaeger-client # but the wheel for thrift does not build
10 changes: 10 additions & 0 deletions manila/scheduler/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,18 @@ def __init__(self, scheduler_driver=None, service_name=None,

def init_host_with_rpc(self, service_id=None):
self.service_id = service_id
try:
open('/etc/manila/probe', 'a')
except Exception as e:
LOG.error("Probe not created: %(e)s", {'e': str(e)})
ctxt = context.get_admin_context()
self.request_service_capabilities(ctxt)
# init done, mark service ready
try:
with open('/etc/manila/probe', 'w+') as f:
f.write('ready\n')
except Exception as e:
LOG.error("Probe not written: %(e)s", {'e': str(e)})

def get_host_list(self, context):
"""Get a list of hosts from the HostManager."""
Expand Down
6 changes: 4 additions & 2 deletions manila/share/drivers/netapp/dataontap/client/client_cmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,10 @@ def _ensure_broadcast_domain_for_port(self, node, port, mtu,

# Port already in desired ipspace and broadcast domain.
if (port_info['ipspace'] == ipspace
and port_info['broadcast-domain'] == domain):
self._modify_broadcast_domain(domain, ipspace, mtu)
and (port_info['broadcast-domain'] == domain
or port_info['broadcast-domain'] == 'OpenStack')):
self._modify_broadcast_domain(
port_info['broadcast-domain'], ipspace, mtu)
return

# If in another broadcast domain, remove port from it.
Expand Down
20 changes: 20 additions & 0 deletions manila/share/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import hashlib
import json
from operator import xor
import os

from keystoneauth1 import loading as ks_loading
from oslo_config import cfg
Expand Down Expand Up @@ -377,6 +378,12 @@ def init_host(self, service_id=None):
"""Initialization for a standalone service."""

self.service_id = service_id
# mark service alive by creating a probe
try:
open('/etc/manila/probe', 'a')
except Exception as e:
LOG.error("Probe not created: %(e)s", {'e': str(e)})

ctxt = context.get_admin_context()
driver_host_pair = "{}@{}".format(
self.driver.__class__.__name__,
Expand All @@ -396,6 +403,13 @@ def _driver_setup():
except Exception:
LOG.exception("Error encountered during initialization of "
"driver %s", driver_host_pair)
# init failed, mark service dead by removing the probe
try:
os.remove('/etc/manila/probe')
except Exception as e:
LOG.error("Not removed: %(e)s", {'e': str(e)})
# we don't want to continue since we failed
# to initialize the driver correctly.
raise
else:
self.driver.initialized = True
Expand All @@ -413,6 +427,12 @@ def _driver_setup():
"@%(host)s'",
{"driver": self.driver.__class__.__name__,
"host": self.host})
# init done, mark service ready
try:
with open('/etc/manila/probe', 'w+') as f:
f.write('ready\n')
except Exception as e:
LOG.error("Probe not written: %(e)s", {'e': str(e)})

def is_service_ready(self):
"""Return if Manager is ready to accept requests.
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
minversion = 3.18.0
envlist = py3,pep8
requires = virtualenv<=20.36
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict.
Expand Down