Comment 1 for bug 617624

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Here is an example for adding two users. This is done via two separate activities on the server, done quickly one after the other so they both get into the same payload:

2010-08-18 10:40:26,912 DEBUG [Dummy-1 ] Received payload:
{'client-accepted-types-hash': 'W\xda\xb7\xc6\xe9Q\xd3=\xf8;^\xed7\xae\xd6\xf2',
 'messages': [{'home-number': None,
               'location': None,
               'name': u'new1',
               'operation-id': 126065,
               'password': u'2010-08-18 10:39:25,404 INFO ',
               'primary-group-name': None,
               'require-password-reset': True,
               'type': 'add-user',
               'username': u'new1',
               'work-number': None},
              {'home-number': None,
               'location': None,
               'name': u'new2',
               'operation-id': 126067,
               'password': u'2010-08-18 10:39:25,404 INFO ',
               'primary-group-name': None,
               'require-password-reset': True,
               'type': 'add-user',
               'username': u'new2',
               'work-number': None}],
 'next-expected-sequence': 53648,
 'server-uuid': '7c6efe47-12fb-11de-91bb-0016353c8658'}
2010-08-18 10:40:26,917 INFO [MainThread] Switching to normal exchange mode.
2010-08-18 10:40:26,986 DEBUG [MainThread] Started firing message.
2010-08-18 10:40:26,986 DEBUG [MainThread] Calling landscape.broker.ping.Pinger._handle_set_intervals() for message with priority 0.
2010-08-18 10:40:26,986 DEBUG [MainThread] Calling landscape.broker.server.BrokerServer.broadcast_message() for message with priority 0.
2010-08-18 10:40:26,987 DEBUG [MainThread] Finished firing message.
2010-08-18 10:40:26,989 DEBUG [MainThread] Started firing message.
2010-08-18 10:40:26,990 DEBUG [MainThread] Calling landscape.broker.ping.Pinger._handle_set_intervals() for message with priority 0.
2010-08-18 10:40:26,990 DEBUG [MainThread] Calling landscape.broker.server.BrokerServer.broadcast_message() for message with priority 0.
2010-08-18 10:40:26,990 DEBUG [MainThread] Finished firing message.
2010-08-18 10:40:26,991 DEBUG [MainThread] Started firing exchange-done.
2010-08-18 10:40:26,991 DEBUG [MainThread] Calling landscape.broker.registration.RegistrationHandler._handle_exchange_done() for exchange-done with priority 0.
2010-08-18 10:40:26,991 DEBUG [MainThread] Finished firing exchange-done.
2010-08-18 10:40:26,991 INFO [MainThread] Message exchange completed in 1.59s.
2010-08-18 10:40:27,621 WARNING [MainThread] No message context for message with operation-id: 126067
2010-08-18 10:40:57,224 INFO [MainThread] Ping indicates message available. Scheduling an urgent exchange.
2010-08-18 10:41:17,606 DEBUG [MainThread] Started firing impending-exchange.
2010-08-18 10:41:17,606 DEBUG [MainThread] Calling landscape.broker.server.BrokerServer.broadcast_event() for impending-exchange with priority 0.
2010-08-18 10:41:17,607 DEBUG [MainThread] Finished firing impending-exchange.
2010-08-18 10:41:27,219 INFO [MainThread] Ping indicates message available. Scheduling an urgent exchange.
2010-08-18 10:41:27,604 DEBUG [MainThread] Started firing pre-exchange.
2010-08-18 10:41:27,604 DEBUG [MainThread] Calling landscape.broker.registration.RegistrationHandler._handle_pre_exchange() for pre-exchange with priority 0.
2010-08-18 10:41:27,605 DEBUG [MainThread] Finished firing pre-exchange.
2010-08-18 10:41:27,606 INFO [MainThread] Starting urgent message exchange with https://staging.landscape.canonical.com/message-system.
2010-08-18 10:41:27,613 DEBUG [Dummy-1 ] Sending payload:
{'accepted-types': '\x1d\x01\xa6j\x0c\x93M\xc0L\xf9\xe0\x95\xe1}\x04{',
 'client-api': '3.3',
 'messages': [{'api': '3.2',
               'operation-id': 126067,
               'result-text': u"Adding user `new2' ...\nAdding new group `new2' (1000) ...\nAdding new user `new2' (1000) with group `new2' ...\nCreating home directory `/home/new2' ...\nCopying files from `/etc/skel' ...\npasswd: password expiry information changed.\n",
               'status': 6,
               'timestamp': 1282142427,
               'type': 'operation-result'},
              {'api': '3.2',
               'create-groups': [{'gid': 1000, 'name': u'new2'}],
               'create-users': [{'enabled': True,
                                 'home-phone': None,
                                 'location': None,
                                 'name': u'new2',
                                 'primary-gid': 1000,
                                 'uid': 1000,
                                 'username': u'new2',
                                 'work-phone': None}],
               'operation-id': 126067,
               'timestamp': 1282142427,
               'type': 'users'},
              {'api': '3.2',
               'kill-processes': [24709],
               'timestamp': 1282142477,
               'type': 'active-process-info',
               'update-processes': [{'gid': 108,
(...)