},
{
"type": "LxcImage",
- "name": "ubuntu1604-cicnsuite-rc1",
+ "name": "ubuntu1604-cicnsuite-rc2",
"node": "server"
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod1",
"node": "server"
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod2",
"node": "server"
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "core2",
"node": "server"
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "core1",
"node": "server"
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons1",
"node": "server"
},
"type": "LxcContainer",
"name": "cons2",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1"
+ "image": "ubuntu1604-cicnsuite-rc2"
},
{
"type": "MetisForwarder",
},
{
"type": "LxcImage",
- "name": "ubuntu1604-cicnsuite-rc1",
+ "name": "ubuntu1604-cicnsuite-rc2",
"node": "server",
"managed": false
},
"type": "LxcContainer",
"node": "server",
"name": "bridge1",
- "image": "ubuntu1604-cicnsuite-rc1"
+ "image": "ubuntu1604-cicnsuite-rc2"
},
{
"type": "VPP",
"type": "LxcContainer",
"node": "server",
"name": "core1",
- "image": "ubuntu1604-cicnsuite-rc1"
+ "image": "ubuntu1604-cicnsuite-rc2"
},
{
"type": "VPP",
"type": "LxcContainer",
"node": "server",
"name": "core2",
- "image": "ubuntu1604-cicnsuite-rc1"
+ "image": "ubuntu1604-cicnsuite-rc2"
},
{
"type": "VPP",
"type": "LxcContainer",
"node": "server",
"name": "bridge2",
- "image": "ubuntu1604-cicnsuite-rc1"
+ "image": "ubuntu1604-cicnsuite-rc2"
},
{
"type": "VPP",
"ip_address" : "172.17.3.23",
"mac_address": "08:00:27:f2:a8:d9",
"name": "bridge2-dpdk1"
- },
+ },
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons1"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons2"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons3"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons4"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons5"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod1"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod2"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod3"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod4"
},
{
{
"type": "LxcContainer",
"node": "server",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod5"
},
{
},
{
"type": "LxcImage",
- "name": "ubuntu1604-cicnsuite-rc1",
+ "name": "ubuntu1604-cicnsuite-rc2",
"node": "server"
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "cons",
"node": "server",
"category": "tablet",
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "wifi",
"node": "server",
"category": "wifi",
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "lte",
"node": "server",
"category": "lte",
},
{
"type": "LxcContainer",
- "image": "ubuntu1604-cicnsuite-rc1",
+ "image": "ubuntu1604-cicnsuite-rc2",
"name": "prod",
"node": "server",
"category": "video-server",
--- /dev/null
+{
+ "settings": {
+ "network": "192.168.128.0/24",
+ "ulimit-n": 10000
+ },
+ "resources": [
+ {
+ "type": "Physical",
+ "name": "server",
+ "hostname": "localhost"
+ },
+ {
+ "type": "NetDevice",
+ "device_name": "eth0",
+ "managed": false,
+ "node": "server"
+ },
+ {
+ "type": "LxcImage",
+ "name": "ubuntu1604-cicnsuite-rc2",
+ "node": "server"
+ },
+ {
+ "name": "u1core",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "asr",
+ "type": "LxcContainer",
+ "y": 10,
+ "x": 5,
+ "node": "server"
+ },
+ {
+ "name": "u1srv1",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "meizu",
+ "type": "LxcContainer",
+ "y": 8,
+ "x": 2,
+ "node": "server"
+ },
+ {
+ "name": "u1srv2",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "meizu",
+ "type": "LxcContainer",
+ "y": 12,
+ "x": 2,
+ "node": "server"
+ },
+ {
+ "name": "u2core",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "asr",
+ "type": "LxcContainer",
+ "y": 6,
+ "x": 9,
+ "node": "server"
+ },
+ {
+ "name": "u2srv1",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "meizu",
+ "type": "LxcContainer",
+ "y": 2,
+ "x": 9,
+ "node": "server"
+ },
+ {
+ "name": "u3core",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "asr",
+ "type": "LxcContainer",
+ "y": 12,
+ "x": 13,
+ "node": "server"
+ },
+ {
+ "name": "u3srv1",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "meizu",
+ "type": "LxcContainer",
+ "y": 10,
+ "x": 16,
+ "node": "server"
+ },
+ {
+ "name": "u3srv2",
+ "image": "ubuntu1604-cicnsuite-rc2",
+ "category": "meizu",
+ "type": "LxcContainer",
+ "y": 14,
+ "x": 16,
+ "node": "server"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 2000000,
+ "node": "u1core"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 0,
+ "node": "u1srv1"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 0,
+ "node": "u1srv2"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 2000000,
+ "node": "u2core"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 0,
+ "node": "u2srv1"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 2000000,
+ "node": "u3core"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 0,
+ "node": "u3srv1"
+ },
+ {
+ "type": "WebServer",
+ "prefixes": [
+ "/webserver1"
+ ],
+ "node": "u3srv1"
+ },
+ {
+ "type": "MetisForwarder",
+ "cache_size": 0,
+ "node": "u3srv2"
+ },
+ {
+ "type": "WebServer",
+ "prefixes": [
+ "/webserver2"
+ ],
+ "node": "u3srv2"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u1srv1",
+ "capacity": 100,
+ "src_node": "u1core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u1srv2",
+ "capacity": 100,
+ "src_node": "u1core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u2srv1",
+ "capacity": 100,
+ "src_node": "u2core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u3srv1",
+ "capacity": 100,
+ "src_node": "u3core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u3srv2",
+ "capacity": 100,
+ "src_node": "u3core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u2core",
+ "src_node": "u1core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u3core",
+ "src_node": "u1core"
+ },
+ {
+ "type": "Link",
+ "dst_node": "u2core",
+ "src_node": "u3core"
+ },
+ {
+ "type": "CentralIP",
+ "ip_routing_strategy": "spt"
+ },
+ {
+ "type": "CentralICN",
+ "face_protocol": "udp4"
+ }
+ ]
+}
if ENABLE_LXD_WORKAROUND and \
(isinstance(e, LxdNotFound) or isinstance(e, LXDAPIException)):
new_state = AttributeState.RESET
- log.error('LXD Fix (not found). Reset attribute')
+ log.warning('LXD Fix (not found). Reset attribute')
resource._state.attr_change_success[attribute.name] = True
else:
log.error('Attribute error {} for resource {}'.format(
if ENABLE_LXD_WORKAROUND and \
(isinstance(attrs, LxdNotFound) or isinstance(attrs, LXDAPIException)):
new_state = AttributeState.RESET
- log.error('LXD Fix (not found). Reset attribute')
+ log.warning('LXD Fix (not found). Reset attribute')
resource._state.attr_change_success[attribute.name] = True
else:
self.attr_log(resource, attribute,
if ENABLE_LXD_WORKAROUND and \
(isinstance(attrs, LxdNotFound) or isinstance(attrs, LXDAPIException)):
new_state = AttributeState.RESET
- log.error('LXD Fix (not found). Reset attribute')
+ log.warning('LXD Fix (not found). Reset attribute')
resource._state.attr_change_success[attribute.name] = True
else:
log.error('Attribute error {} for resource {}'.format(
# "not found" is the normal exception when the container
# does not exists. anyways the bug should only occur
# with container.execute(), not container.get()
- log.error('LXD Fix (not found). Reset resource')
+ log.warning('LXD Fix (not found). Reset resource')
new_state = ResourceState.INITIALIZED
elif ENABLE_LXD_WORKAROUND and isinstance(e, LXDAPIException):
# "not found" is the normal exception when the container
# does not exists. anyways the bug should only occur
# with container.execute(), not container.get()
- log.error('LXD Fix (API error). Reset resource')
+ log.warning('LXD Fix (API error). Reset resource')
new_state = ResourceState.INITIALIZED
elif isinstance(e, ResourceNotFound):
# The resource does not exist
self.log(resource, 'KEYS failed: {}'.format(e))
if ENABLE_LXD_WORKAROUND and isinstance(e, LxdNotFound):
- log.error('LXD Fix (not found). Reset resource')
+ log.warning('LXD Fix (not found). Reset resource')
new_state = ResourceState.CREATED
resource._state.change_success = True
else:
e = resource._state.change_value
if ENABLE_LXD_WORKAROUND and isinstance(e, LxdNotFound):
- log.error('LXD Fix (not found). Reset resource')
+ log.warning('LXD Fix (not found). Reset resource')
new_state = ResourceState.INITIALIZED
resource._state.change_success = True
elif ENABLE_LXD_WORKAROUND and \
isinstance(e, LXDAPIException):
- log.error('LXD Fix (API error). Reset resource')
+ log.warning('LXD Fix (API error). Reset resource')
new_state = ResourceState.INITIALIZED
resource._state.change_success = True
elif 'File exists' in str(e):
self.log(resource, 'UPDATE failed: {}'.format(e))
if ENABLE_LXD_WORKAROUND and isinstance(e, LxdNotFound):
- log.error('LXD Fix (not found). Reset resource')
+ log.warning('LXD Fix (not found). Reset resource')
new_state = ResourceState.CREATED
resource._state.change_success = True
resource._state.write_lock.release()
import logging
import shlex
import subprocess
+import os
from vicn.core.scheduling_algebra import SchedulingAlgebra
from vicn.core.commands import ReturnValue
EXECUTOR=concurrent.futures.ThreadPoolExecutor
#EXECUTOR=concurrent.futures.ProcessPoolExecutor
-MAX_WORKERS = 50 # None
+#Sets the number of task workers to the number of CPU threads+1
+MAX_WORKERS = os.cpu_count()+1
class BaseTask:
"""Base class for all tasks