)]}'
{"Engine/swift/storlet_gateway/common/stob.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class FileDescriptorIterator(object):"},{"line_number":23,"context_line":"    def __init__(self, fd, timeout, cancel_func):"},{"line_number":24,"context_line":"        self.closed \u003d False"},{"line_number":25,"context_line":"        self.fd \u003d fd"},{"line_number":26,"context_line":"        self.timeout \u003d timeout"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_cd9292f5","line":23,"updated":"2016-08-02 06:50:59.000000000","message":"yep!","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"}],"tests/unit/swift/storlet_gateway/gateways/docker/test_gateway.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        self.obj \u003d \u0027object\u0027"},{"line_number":146,"context_line":"        self.sobj \u003d \u0027storlet-1.0.jar\u0027"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # TODO(kota_): shoudl be \u0027storlet-internal-client.conf\u0027 actually"},{"line_number":149,"context_line":"        ic_conf_path \u003d os.path.join(self.tempdir,"},{"line_number":150,"context_line":"                                    \u0027storlet-proxy-server.conf\u0027)"},{"line_number":151,"context_line":"        with open(ic_conf_path, \u0027w\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_c861e0d4","line":148,"updated":"2016-08-02 06:50:59.000000000","message":"right!","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        # TODO(kota_): need more efficient way for emuration of return value"},{"line_number":318,"context_line":"        # from SDaemon"},{"line_number":319,"context_line":"        value_generator \u003d iter(["},{"line_number":320,"context_line":"            # Firt is for confirmation for SDaemon running"},{"line_number":321,"context_line":"            \u0027True: daemon running confirmation\u0027,"},{"line_number":322,"context_line":"            # Second is stop SDaemon in activation"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_c8da8016","line":319,"updated":"2016-08-02 06:50:59.000000000","message":"I guess you are aware of it, but still I thought I would mention that the protocol can also have different paths:\n1. Daemon is not running and we start it\n2. Docker storlet is not updated and so we do not need to restart the daemon\n3. timeout yielding a cancel command\n4. docker container is not running and we invoke it.\n\n\nI guess that to test all this a lot of mock work is required. Still this is a really really great addition!!!\n\nsuggestion: If/When this will be added perhaps it is a good idea to break activate_storlet_daemon part from the rest of the protocol.","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"}],"tests/unit/swift/storlet_gateway/gateways/docker/test_runtime.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        # \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":204,"context_line":"        #"},{"line_number":205,"context_line":"        # With this test,  the account value is \"account\" (because of w/o"},{"line_number":206,"context_line":"        # reseller_prefix), and the storlet_id is \"Storlet-1.0.jar\" (app name?)"},{"line_number":207,"context_line":"        # ok, let\u0027s check for these values"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        runtime_paths \u003d RunTimePaths(\u0027AUTH_account\u0027, {})"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_6800b434","line":206,"updated":"2016-08-02 06:50:59.000000000","message":"Note that in tun time the storlet id is the unique name of the class, e.g. com.ibm.storlet.identity.IdentityStorlet, and the account is made of 13 chars of the account id prefix, e.g. 40d45a551bb84","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        self.assertEqual("},{"line_number":222,"context_line":"            \u0027/home/docker_device/pipes/scopes/AUTH_account/Storlet-1.0.jar\u0027,"},{"line_number":223,"context_line":"            runtime_paths.host_storlet_pipe(storlet_id))"},{"line_number":224,"context_line":"        # 3. Yes, right now, we don\u0027t have the path for #3 in Python"},{"line_number":225,"context_line":"        # 4. sandbox_storlet_pipe_path | /mnt/channels/\u003cstorlet_id\u003e"},{"line_number":226,"context_line":"        self.assertEqual(\u0027/mnt/channels/Storlet-1.0.jar\u0027,"},{"line_number":227,"context_line":"                         runtime_paths.sbox_storlet_pipe(storlet_id))"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_4859708d","line":224,"updated":"2016-08-02 06:50:59.000000000","message":"I guess this is a test to do in the factory...","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self.assertEqual(\u0027/mnt/channels/Storlet-1.0.jar\u0027,"},{"line_number":227,"context_line":"                         runtime_paths.sbox_storlet_pipe(storlet_id))"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # This looks like for jar load?"},{"line_number":230,"context_line":"        self.assertEqual(\u0027/home/docker_device/storlets/scopes/AUTH_account\u0027,"},{"line_number":231,"context_line":"                         runtime_paths.host_storlet_prefix())"},{"line_number":232,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_ee4f8d68","line":229,"updated":"2016-08-02 06:50:59.000000000","message":"This is the host side dir (mapped to the sandbox) where storlets are placed.","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        self.assertEqual("},{"line_number":233,"context_line":"            \u0027/home/docker_device/storlets/scopes/AUTH_account/Storlet-1.0.jar\u0027,"},{"line_number":234,"context_line":"            runtime_paths.host_storlet(storlet_id))"},{"line_number":235,"context_line":"        # And this one is a mount poit in sand box?"},{"line_number":236,"context_line":"        self.assertEqual(\u0027/home/swift/Storlet-1.0.jar\u0027,"},{"line_number":237,"context_line":"                         runtime_paths.sbox_storlet_exec(storlet_id))"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_ce79e994","line":235,"updated":"2016-08-02 06:50:59.000000000","message":"This is the sandbox side mapped to the host from where the storlet daemon loads the jar(s)","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"856ac995fb8aa971280ac12878d00743884be2bc","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        self.assertTrue(os.path.exists(path))"},{"line_number":245,"context_line":"        self.assertTrue(os.path.isdir(path))"},{"line_number":246,"context_line":"        permission \u003d oct(os.stat(path)[ST_MODE])[-3:]"},{"line_number":247,"context_line":"        # TODO(kota_): make sure if this is really acceptable"},{"line_number":248,"context_line":"        self.assertEqual(\u0027777\u0027, permission)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_cebf29ce","line":247,"updated":"2016-08-02 06:50:59.000000000","message":"Good point. Here is why we use 777.\nOriginally, we wanted to make this 700 and make sure we have the same owner (user id) in both the host side and the sandbox side (at the time the ubuntu kernel did not support user namespaces).\n\nNow, the user in the host side is typically swift, and so to make this work we needed during installation to get the user id of user swift, and create it in the docker container. Since the user id of swift can potentially be different across machines, this was not trivial, and so we ended up with 777.\n\nIMO, the right way to do so is utilise user namespaces:\nDuring installation time, get the user id under which swift is running.\nRun the sandbox with an internal user whose id maps to the swift run time user id (this is where user namespaces come into play).\nmake sure the factory runs with that internal user id.","commit_id":"c46653d27a5cad7ffc5d597f38399d7301ce9c0a"}]}
