Labtainers
                                
                                
                                
                                    Labtainers copied to clipboard
                            
                            
                            
                        Type error in ParseStartConfig.py
Description
When rebuilding / launching a multi-user conformant lab using the -n options, you get an TypeError which prevents you to run / build the lab.
Expected behavior
Create and launch n instances of CLIENT containers.
Actual behavior
When building / launching a conformant multi-user labs using either :
rebuild myLab -n 3
or:
Labtainer myLab -n 3 
I Get the following error :
Traceback (most recent call last):
  File "bin/start.py", line 289, in <module>
    sys.exit(main())
  File "bin/start.py", line 276, in main
    labutils.StartLab(lab_path, quiet_start=args.quiet, run_container=args.only_container, servers=distributed, clone_count=args.client_count)
  File "/home/student/labtainer/trunk/scripts/labtainer-student/bin/labutils.py", line 2023, in StartLab
    labtainer_config, start_config = GetBothConfigs(lab_path, logger, servers, clone_count)
  File "/home/student/labtainer/trunk/scripts/labtainer-student/bin/labutils.py", line 1194, in GetBothConfigs
    labtainer_config, logger, servers=servers, clone_count=clone_count)
  File "/home/student/labtainer/trunk/scripts/labtainer-student/bin/ParseStartConfig.py", line 81, in __init__
    if self.clone_count is not None and self.clone_count > 0: 
TypeError: '>' not supported between instances of 'str' and 'int'
Reproducible example
- create a conformant multi-user lab (MACVLAN 1, +CLONE_COUNT)
 - run either 
rebuildcommand orlabtainerusing the dash n option 
Quick fix / workaround
I just casted to int the arg : /home/student/labtainer/trunk/scripts/labtainer-student/bin/ParseStartConfig.py (around line 78)
 self.get_configs(fname)
        self.multi_user = None
        ''' determine if running as a distributed Labtainers, or many clients on a single VM '''
        if self.clone_count is not None and int(self.clone_count) > 0: 
            self.multi_user = 'clones'
        elif servers is not None:
            self.multi_user = servers 
        self.finalize()
        self.validate()
        self.logger.debug('Completed reload from %s' % fname)
                                    
                                    
                                    
                                
Thanks for the report and the details on the workaround. I'll get that fix into the pipeline.