ha stateservers apihostports writing no op/change updates to db

Bug #1312290 reported by Kapil Thangavelu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Unassigned

Bug Description

Roughly every minute we get a write transaction to mongo to update the addresses for the stateapi severs ports and network addresses. This should only happen if there is a change in value, else we're just creating db churn. I have hundreds of the following in the transaction log.

2014/04/24-16:25:42 applied
    stateServers:apiHostPorts update {u'$set': {u'apihostports': [[{u'networkscope': u'public', u'addresstype': u'ipv4', u'port': 17070, u'value': u'1\
07.170.210.210'}, {u'networkscope': u'local-machine', u'addresstype': u'ipv4', u'port': 17070, u'value': u'127.0.0.1'}, {u'networkscope': u'local-mach\
ine', u'addresstype': u'ipv6', u'port': 17070, u'value': u'::1'}, {u'addresstype': u'ipv6', u'port': 17070, u'value': u'fe80::601:17ff:fe48:801'}]]}}
2014/04/24-16:26:42 applied
    stateServers:apiHostPorts update {u'$set': {u'apihostports': [[{u'networkscope': u'public', u'addresstype': u'ipv4', u'port': 17070, u'value': u'1\
07.170.210.210'}, {u'networkscope': u'local-machine', u'addresstype': u'ipv4', u'port': 17070, u'value': u'127.0.0.1'}, {u'networkscope': u'local-mach\
ine', u'addresstype': u'ipv6', u'port': 17070, u'value': u'::1'}, {u'addresstype': u'ipv6', u'port': 17070, u'value': u'fe80::601:17ff:fe48:801'}]]}}

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.0
tags: added: ha mongodb
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1312290] Re: ha stateservers apihostports writing no op/change updates to db

It should be once every 15 minutes once things stabilize, but I agree. Also
when we do this it wakes up everything connected to those machines because
it looks like they have a change so their NotifyWatchers fire (for things
like the Upgrader)

On Thu, Apr 24, 2014 at 9:01 PM, Curtis Hovey <email address hidden> wrote:

> ** Changed in: juju-core
> Status: New => Triaged
>
> ** Changed in: juju-core
> Importance: Undecided => High
>
> ** Changed in: juju-core
> Milestone: None => 2.0
>
> ** Tags added: ha mongodb
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1312290
>
> Title:
> ha stateservers apihostports writing no op/change updates to db
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1312290/+subscriptions
>

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

the time period is mostly irrelevant wrt to checking (ie 1m is fine),
writes should only happen on change.

On Thu, Apr 24, 2014 at 11:13 PM, John A Meinel <email address hidden>wrote:

> It should be once every 15 minutes once things stabilize, but I agree. Also
> when we do this it wakes up everything connected to those machines because
> it looks like they have a change so their NotifyWatchers fire (for things
> like the Upgrader)
>
>
> On Thu, Apr 24, 2014 at 9:01 PM, Curtis Hovey <email address hidden>
> wrote:
>
> > ** Changed in: juju-core
> > Status: New => Triaged
> >
> > ** Changed in: juju-core
> > Importance: Undecided => High
> >
> > ** Changed in: juju-core
> > Milestone: None => 2.0
> >
> > ** Tags added: ha mongodb
> >
> > --
> > You received this bug notification because you are subscribed to juju-
> > core.
> > https://bugs.launchpad.net/bugs/1312290
> >
> > Title:
> > ha stateservers apihostports writing no op/change updates to db
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/juju-core/+bug/1312290/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1312290
>
> Title:
> ha stateservers apihostports writing no op/change updates to db
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1312290/+subscriptions
>

Curtis Hovey (sinzui)
tags: added: performance
Curtis Hovey (sinzui)
Changed in juju-core:
importance: High → Medium
affects: juju-core → juju
Changed in juju:
milestone: none → 2.0.0
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

This was fixed quite a long time ago. See https://github.com/juju/juju/pull/389

I have just confirmed that the problem is definitely gone by spinning up a HA controller and watching transactions which update apiHostPorts.

Changed in juju:
milestone: 2.0.0 → none
status: Triaged → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.