Skip to content

Commit

Permalink
Merge pull request #905 from projectcalico/1.2-reintegrate
Browse files Browse the repository at this point in the history
Reintegrate 1.2.1
  • Loading branch information
matthewdupre committed Nov 23, 2015
2 parents 0d44c4e + bf13f65 commit f8d3785
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 17 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,14 @@
- Felix now parses the etcd snapshot in parallel with the event stream;
this dramatically increases scale when under load.

## 1.2.1

- Fix Felix ipset exception when using IPIP.
- Use iptables protocol numbers not names.
- Fixes to diagnostics collection scripts.
- Pin networking-calico pip version.
- Really delete routes to ns-* devices in pre-Liberty OpenStack.

## 1.2.0

- Add liveness reporting to Felix. Felix now reports its liveness into
Expand Down
6 changes: 4 additions & 2 deletions calico/felix/fetcd.py
Expand Up @@ -641,8 +641,10 @@ def _update_hosts_ipset(self):
if not self._been_in_sync:
_log.debug("Deferring update to hosts ipset until we're in-sync")
return
self.hosts_ipset.replace_members(self.ipv4_by_hostname.values(),
async=True)
self.hosts_ipset.replace_members(
frozenset(self.ipv4_by_hostname.values()),
async=True
)

def _on_config_updated(self, response, config_param):
new_value = response.value
Expand Down
8 changes: 6 additions & 2 deletions calico/felix/ipsets.py
Expand Up @@ -533,10 +533,11 @@ def replace_members(self, members, force_reprogram=False):
"""
Replace the members of this ipset with the supplied set.
:param set[str] members: IP address strings. Must be a copy
(as this routine keeps a link to it).
:param set[str]|frozenset[str] members: IP address strings. Must be a
copy (as this routine keeps a link to it).
"""
_log.info("Replacing members of ipset %s", self.name)
assert isinstance(members, (set, frozenset))
self.members = members
self._force_reprogram |= force_reprogram

Expand Down Expand Up @@ -662,6 +663,8 @@ def update_members(self, old_members, new_members):
"""
Update the ipset with changes to members. The set must exist.
"""
assert isinstance(old_members, (set, frozenset))
assert isinstance(new_members, (set, frozenset))
assert len(new_members) <= self.max_elem
try:
input_lines = ["del %s %s" % (self.set_name, m)
Expand All @@ -688,6 +691,7 @@ def replace_members(self, members):
# so we build up the complete set of members in a temporary ipset,
# swap it into place and then delete the old ipset.
_log.info("Rewriting ipset %s with %d members", self, len(members))
assert isinstance(members, (set, frozenset))
assert len(members) <= self.max_elem
# Try to destroy the temporary set so that we get to recreate it below,
# possibly with new parameters.
Expand Down
8 changes: 4 additions & 4 deletions calico/felix/test/test_fetcd.py
Expand Up @@ -303,7 +303,7 @@ def test_on_status_from_driver(self):
self.assertEqual(self.m_splitter.on_datamodel_in_sync.mock_calls,
[call(async=True)])
self.assertEqual(self.m_hosts_ipset.replace_members.mock_calls,
[call([], async=True)])
[call(frozenset([]), async=True)])

@patch("subprocess.Popen")
@patch("socket.socket")
Expand Down Expand Up @@ -467,7 +467,7 @@ def test_host_ip_set(self):
self.dispatch("/calico/v1/host/foo/bird_ip",
action="set", value="10.0.0.1")
self.m_hosts_ipset.replace_members.assert_called_once_with(
["10.0.0.1"],
frozenset(["10.0.0.1"]),
async=True,
)

Expand All @@ -494,7 +494,7 @@ def test_host_ip_del(self):
self.dispatch("/calico/v1/host/foo/bird_ip",
action="delete")
self.m_hosts_ipset.replace_members.assert_called_once_with(
[],
frozenset([]),
async=True,
)

Expand All @@ -509,7 +509,7 @@ def test_host_ip_invalid(self):
self.dispatch("/calico/v1/host/foo/bird_ip",
action="set", value="gibberish")
self.m_hosts_ipset.replace_members.assert_called_once_with(
[],
frozenset([]),
async=True,
)

Expand Down
11 changes: 7 additions & 4 deletions debian/changelog
@@ -1,9 +1,12 @@
calico (1.3.0~pre.1) trusty; urgency=medium
calico (1.2.1-1) trusty; urgency=medium

* Felix now parses the etcd snapshot in parallel with the event stream;
this dramatically increases scale when under load.
* Fix Felix ipset exception when using IPIP.
* Use iptables protocol numbers not names.
* Fixes to diagnostics collection scripts.
* Pin networking-calico pip version.
* Really delete routes to ns-* devices in pre-Liberty OpenStack.

-- Shaun Crampton <shaun@projectcalico.org> Mon, 26 Oct 2015 13:41:00 +0100
-- Matt Dupre <matt@projectcalico.org> Fri, 13 Nov 2015 12:23:09 +0000

calico (1.2.0-1) trusty; urgency=medium

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Expand Up @@ -53,9 +53,9 @@
# built documents.
#
# The short X.Y version.
version = '1.2.0'
version = '1.2.1'
# The full version, including alpha/beta/rc tags.
release = '1.2.0'
release = '1.2.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/redhat-opens-install.rst
Expand Up @@ -422,7 +422,7 @@ On each compute node, perform the following steps:
::

yum install python-pip
pip install networking-calico
pip install networking-calico==1.0.0

Open ``/etc/neutron/dhcp_agent.ini``. For OpenStack Juno or Kilo, in the
``[DEFAULT]`` section, add the following line (removing any existing
Expand Down
2 changes: 1 addition & 1 deletion docs/source/ubuntu-opens-install.rst
Expand Up @@ -319,7 +319,7 @@ perform the following steps:
::

sudo apt-get install neutron-common neutron-dhcp-agent nova-api-metadata python-pip
sudo pip install networking-calico
sudo pip install networking-calico==1.0.0

5. Run ``apt-get upgrade`` and ``apt-get dist-upgrade``. These commands
will bring in Calico-specific updates to the OpenStack packages and
Expand Down
7 changes: 7 additions & 0 deletions rpm/calico.spec
Expand Up @@ -212,6 +212,13 @@ rm -rf $RPM_BUILD_ROOT


%changelog
* Fri Nov 13 2015 Matt Dupre <matt@projectcalico.org> 1.2.1-1
- Fix Felix ipset exception when using IPIP.
- Use iptables protocol numbers not names.
- Fixes to diagnostics collection scripts.
- Pin networking-calico pip version.
- Really delete routes to ns-* devices in pre-Liberty OpenStack.

* Mon Oct 26 2015 Matt Dupre <matt@projectcalico.org> 1.2.0-1
- Truncate long output from FailedSystemCall exception.
- Add instructions for use with OpenStack Liberty.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -71,7 +71,7 @@ def filter_requirements(filters, file):

setuptools.setup(
name="calico",
version="1.2.0",
version="1.2.1",
packages=setuptools.find_packages(),
entry_points={
'console_scripts': [
Expand Down

0 comments on commit f8d3785

Please sign in to comment.