mgr/smb: remove restriction on 1MiB smb config objects in rados
For convenience I had originally capped the size of objects created
by the smb mgr module to 1MiB in order to avoid having to read objects
with more than one rados call. This value matched a value hardcoded in
the NFS mgr module.
However, testers are trying to create a large number of shares and some
configurations caused the JSON contents we try to write to a rados
object to exceed 1MiB. Implement a _read_all function to allow objects
to exceed the chunk size and remove the matching restriction from
the write path.
I was able to test this change by create 4096 shares. Prior to the
change the a traceback similar to the following would occur. After the
change it did not occur and I could verify the object in rados was
>1MiB.
```
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1930, in
_handle_command
return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
File "/usr/share/ceph/mgr/mgr_module.py", line 527, in call
return self.func(mgr, **kwargs)
File "/usr/share/ceph/mgr/object_format.py", line 592, in
_format_response
robj = f(*args, **kwargs)
File "/usr/share/ceph/mgr/smb/module.py", line 148, in apply_resources
return self._handler.apply(resources.load_text(inbuf))
File "/usr/share/ceph/mgr/smb/handler.py", line 412, in apply
self._sync_modified(results)
File "/usr/share/ceph/mgr/smb/handler.py", line 580, in _sync_modified
self._sync_clusters(cluster_ids)
File "/usr/share/ceph/mgr/smb/handler.py", line 564, in _sync_clusters
self._save_cluster_settings(change_group)
File "/usr/share/ceph/mgr/smb/handler.py", line 640, in
_save_cluster_settings
_save_pending_config(
File "/usr/share/ceph/mgr/smb/handler.py", line 1397, in
_save_pending_config
centry.set(cconfig)
File "/usr/share/ceph/mgr/smb/rados_store.py", line 89, in set
self.write(json.dumps(obj))
File "/usr/share/ceph/mgr/smb/rados_store.py", line 71, in write
assert len(data) < _CHUNK_SIZE
AssertionError
```
Signed-off-by: John Mulligan <jmulligan@redhat.com>