Commit 8fae60f7 authored by Rafael Monnerat's avatar Rafael Monnerat

Prepare 1.0.17 release

parents 1d1d3127 e1d7a15e
...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages ...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '1.0.17.dev0' version = '1.0.17'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n" open("CHANGES.txt").read() + "\n"
......
...@@ -208,8 +208,9 @@ def dumpIPv6Network(slave_reference, db, network, ipv6_file): ...@@ -208,8 +208,9 @@ def dumpIPv6Network(slave_reference, db, network, ipv6_file):
cn = x509.subnetFromCert(cert) cn = x509.subnetFromCert(cert)
subnet = network + utils.binFromSubnet(cn) subnet = network + utils.binFromSubnet(cn)
ipv6 = utils.ipFromBin(subnet) ipv6 = utils.ipFromBin(subnet)
changed = readFile(ipv6_file) != ipv6
writeFile(ipv6_file, ipv6) writeFile(ipv6_file, ipv6)
return ipv6, utils.binFromSubnet(cn) return ipv6, utils.binFromSubnet(cn), changed
except Exception: except Exception:
log.debug('XXX for %s... \n %s' % (slave_reference, log.debug('XXX for %s... \n %s' % (slave_reference,
traceback.format_exc())) traceback.format_exc()))
...@@ -234,8 +235,9 @@ def dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list): ...@@ -234,8 +235,9 @@ def dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list):
if ipv6_prefix == "00000000000000000000000000000000": if ipv6_prefix == "00000000000000000000000000000000":
# workarround to ignore the first node # workarround to ignore the first node
ipv4 = "0.0.0.0" ipv4 = "0.0.0.0"
changed = readFile(ipv4_file) != ipv4
writeFile(ipv4_file, ipv4) writeFile(ipv4_file, ipv4)
return return ipv4, changed
peers = [] peers = []
...@@ -265,10 +267,13 @@ def dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list): ...@@ -265,10 +267,13 @@ def dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list):
ipv4 = msg.split(',')[0] ipv4 = msg.split(',')[0]
else: else:
ipv4 = "0.0.0.0" ipv4 = "0.0.0.0"
changed = readFile(ipv4_file) != ipv4
writeFile(ipv4_file, ipv4) writeFile(ipv4_file, ipv4)
return ipv4, changed
except Exception: except Exception:
log.debug('XXX for %s... \n %s' % (ipv6_prefix, log.info('XXX for %s... \n %s' % (ipv6_prefix,
traceback.format_exc())) traceback.format_exc()))
return "0.0.0.0", False
def checkService(args, can_bang=True): def checkService(args, can_bang=True):
base_token_path = args['token_base_path'] base_token_path = args['token_base_path']
...@@ -300,12 +305,18 @@ def checkService(args, can_bang=True): ...@@ -300,12 +305,18 @@ def checkService(args, can_bang=True):
ipv4_file = os.path.join(base_token_path, '%s.ipv4' % slave_reference) ipv4_file = os.path.join(base_token_path, '%s.ipv4' % slave_reference)
if not os.path.exists(status_file): if not os.path.exists(status_file):
# This token is not added yet! # This token is not added yet!
log.info("Token %s dont exist yet." % status_file)
continue continue
msg = readFile(status_file) msg = readFile(status_file)
log.info("Token %s has %s State." % (status_file, msg))
if msg == 'TOKEN_USED': if msg == 'TOKEN_USED':
ipv6, ipv6_prefix = dumpIPv6Network(slave_reference, db, network, ipv6_file) log.info("Dumping ipv6...")
dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list) ipv6, ipv6_prefix, ipv6_changed = dumpIPv6Network(slave_reference, db, network, ipv6_file)
log.info("%s, IPV6 = %s, IPV6_PREFIX = %s" % (slave_reference, ipv6, ipv6_prefix))
_, ipv4_changed = dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list)
if ipv4_changed or ipv6_changed:
call_bang = True
continue continue
# Check if token is not in the database # Check if token is not in the database
...@@ -323,6 +334,7 @@ def checkService(args, can_bang=True): ...@@ -323,6 +334,7 @@ def checkService(args, can_bang=True):
try: try:
writeFile(status_file, 'TOKEN_USED') writeFile(status_file, 'TOKEN_USED')
dumpIPv6Network(slave_reference, db, network, ipv6_file) dumpIPv6Network(slave_reference, db, network, ipv6_file)
dumpIPv4Network(ipv6_prefix, network, ipv4_file, sock, peer_prefix_list)
log.info("Token status of %s updated to 'used'." % slave_reference) log.info("Token status of %s updated to 'used'." % slave_reference)
except IOError: except IOError:
# XXX- this file should always exists # XXX- this file should always exists
......
...@@ -52,25 +52,25 @@ slapos.toolbox = 0.53 ...@@ -52,25 +52,25 @@ slapos.toolbox = 0.53
smmap = 0.9.0 smmap = 0.9.0
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
GitPython = 1.0.1 GitPython = 1.0.1
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
atomize = 0.2.0 atomize = 0.2.0
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
feedparser = 5.2.1 feedparser = 5.2.1
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
lockfile = 0.10.2 lockfile = 0.10.2
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
paramiko = 1.15.2 paramiko = 1.15.2
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
rpdb = 0.1.5 rpdb = 0.1.5
...@@ -113,26 +113,26 @@ slapos.toolbox = 0.53 ...@@ -113,26 +113,26 @@ slapos.toolbox = 0.53
smmap = 0.8.3 smmap = 0.8.3
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
GitPython = 0.3.2.1 GitPython = 0.3.2.1
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
atomize = 0.2.0 atomize = 0.2.0
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
feedparser = 5.1.3 feedparser = 5.1.3
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
paramiko = 1.15.3 paramiko = 1.15.3
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
lockfile = 0.10.2 lockfile = 0.10.2
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
rpdb = 0.1.5 rpdb = 0.1.5
...@@ -135,15 +135,15 @@ gitdb = 0.6.4 ...@@ -135,15 +135,15 @@ gitdb = 0.6.4
plone.recipe.command = 1.1 plone.recipe.command = 1.1
pycrypto = 2.6.1 pycrypto = 2.6.1
slapos.recipe.template = 2.7 slapos.recipe.template = 2.7
slapos.toolbox = 0.47.3 slapos.toolbox = 0.53
smmap = 0.9.0 smmap = 0.9.0
# Required by: # Required by:
# slapos.toolbox==0.47.3 # slapos.toolbox==0.53
GitPython = 0.3.6 GitPython = 0.3.6
# Required by: # Required by:
# slapos.toolbox==0.47.3 # slapos.toolbox==0.53
atomize = 0.2.0 atomize = 0.2.0
# Required by: # Required by:
...@@ -151,11 +151,11 @@ atomize = 0.2.0 ...@@ -151,11 +151,11 @@ atomize = 0.2.0
backports.ssl-match-hostname = 3.4.0.2 backports.ssl-match-hostname = 3.4.0.2
# Required by: # Required by:
# slapos.toolbox==0.47.3 # slapos.toolbox==0.53
feedparser = 5.1.3 feedparser = 5.1.3
# Required by: # Required by:
# slapos.toolbox==0.47.3 # slapos.toolbox==0.53
lockfile = 0.10.2 lockfile = 0.10.2
# Required by: # Required by:
...@@ -163,10 +163,10 @@ lockfile = 0.10.2 ...@@ -163,10 +163,10 @@ lockfile = 0.10.2
miniupnpc = 1.9 miniupnpc = 1.9
# Required by: # Required by:
# slapos.toolbox==0.47.3 # slapos.toolbox==0.53
paramiko = 1.15.3 paramiko = 1.15.3
# Required by: # Required by:
# slapos.toolbox==0.47.3 # slapos.toolbox==0.53
rpdb = 0.1.5 rpdb = 0.1.5
...@@ -23,25 +23,25 @@ slapos.toolbox = 0.53 ...@@ -23,25 +23,25 @@ slapos.toolbox = 0.53
smmap = 0.9.0 smmap = 0.9.0
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
GitPython = 1.0.1 GitPython = 1.0.1
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
atomize = 0.2.0 atomize = 0.2.0
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
feedparser = 5.2.1 feedparser = 5.2.1
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
lockfile = 0.10.2 lockfile = 0.10.2
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
paramiko = 1.15.3 paramiko = 1.15.3
# Required by: # Required by:
# slapos.toolbox==0.52 # slapos.toolbox==0.53
rpdb = 0.1.5 rpdb = 0.1.5
...@@ -135,7 +135,7 @@ requests = 2.8.1 ...@@ -135,7 +135,7 @@ requests = 2.8.1
setuptools = 18.1 setuptools = 18.1
simplejson = 3.8.0 simplejson = 3.8.0
six = 1.10.0 six = 1.10.0
slapos.cookbook = 1.0.16 slapos.cookbook = 1.0.17
slapos.core = 1.3.14 slapos.core = 1.3.14
slapos.extension.strip = 0.1 slapos.extension.strip = 0.1
slapos.libnetworkcache = 0.14.5 slapos.libnetworkcache = 0.14.5
...@@ -171,11 +171,11 @@ functools32 = 3.2.3.post2 ...@@ -171,11 +171,11 @@ functools32 = 3.2.3.post2
ipaddress = 1.0.14 ipaddress = 1.0.14
# Required by: # Required by:
# slapos.cookbook==1.0.16 # slapos.cookbook==1.0.17
jsonschema = 2.5.1 jsonschema = 2.5.1
# Required by: # Required by:
# slapos.cookbook==1.0.16 # slapos.cookbook==1.0.17
lock-file = 2.0 lock-file = 2.0
# Required by: # Required by:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment