Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mig/server/grid_ftps.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Check warning on line 23 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
#
# -- END_HEADER ---
#
Expand Down Expand Up @@ -316,7 +316,7 @@
self.authenticated_user = username
return True
else:
# Must raise AuthenticationFailed exception since version 1.0.0 instead

Check warning on line 319 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (83 > 80 characters)
# of returning bool
self.authenticated_user = None
raise AuthenticationFailed()
Expand All @@ -333,7 +333,7 @@

def _acceptable_chmod(self, ftps_path, mode):
"""Wrap helper"""
#logger.debug("acceptable_chmod: %s" % ftps_path)

Check warning on line 336 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

block comment should start with '# '
reply = acceptable_chmod(ftps_path, mode, self.chmod_exceptions)
if not reply:
logger.warning("acceptable_chmod failed: %s %s %s" %
Expand All @@ -352,7 +352,7 @@
try:
get_fs_path(configuration, path, self.root,
daemon_conf['chroot_exceptions'])
#logger.debug("accepted access to %s" % path)

Check warning on line 355 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

block comment should start with '# '
return True
except ValueError as err:
logger.warning("rejected illegal access to %s :: %s" % (path, err))
Expand Down Expand Up @@ -385,7 +385,7 @@
return [i for i in AbstractedFS.listdir(self, path) if not
invisible_path(i)]

### Force symlinks to look like real dirs to avoid client confusion ###

Check warning on line 388 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

too many leading '#' for block comment
def lstat(self, path):
"""Modified to always return real stat to hide symlinks"""
return self.stat(path)
Expand All @@ -403,7 +403,7 @@
try:
self.stat(path)
return True
except:

Check warning on line 406 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

do not use bare 'except'
return False

def rmdir(self, path):
Expand Down Expand Up @@ -441,7 +441,7 @@
ftp_old_path = self.fs2ftp(old_path)
ftp_new_path = self.fs2ftp(new_path)
# Prevent rename of special files
if in_vgrid_share(configuration, old_path) == ftp_old_path.lstrip(os.sep):

Check warning on line 444 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (82 > 80 characters)
logger.error("rename on vgrid share root %s :: %s" %
(ftp_old_path, old_path))
raise FilesystemError("requested rename not allowed")
Expand Down Expand Up @@ -510,7 +510,7 @@
handler.authorizer = authorizer
handler.abstracted_fs = MiGRestrictedFilesystem
# TODO: masqueraded ftps fails from fireftp - maybe this would help?
# if configuration.user_ftps_show_address != configuration.user_ftps_address:

Check warning on line 513 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
# handler.masquerade_address = socket.gethostbyname(
# configuration.user_ftps_show_address)
handler.passive_ports = conf.user_ftps_pasv_ports
Expand Down Expand Up @@ -619,3 +619,4 @@
info_msg = "Leaving with no more workers active"
logger.info(info_msg)
print(info_msg)

Check warning on line 622 in mig/server/grid_ftps.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

blank line at end of file
1 change: 1 addition & 0 deletions mig/server/grid_openid.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Check warning on line 23 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
#
# -- END_HEADER ---
#
Expand Down Expand Up @@ -1792,3 +1792,4 @@
info_msg = "Leaving with no more workers active"
logger.info(info_msg)
print(info_msg)

1 change: 1 addition & 0 deletions mig/server/grid_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,29 +279,29 @@
scheduler = FirstFitScheduler(logger, configuration)
elif configuration.sched_alg == 'BestFit':
from mig.server.bestfitscheduler import BestFitScheduler
scheduler = BestFitScheduler(logger, configuration)

Check failure on line 282 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Incompatible types in assignment (expression has type "BestFitScheduler", variable has type "FirstFitScheduler | None") [assignment]
elif configuration.sched_alg == 'FairFit':
from mig.server.fairfitscheduler import FairFitScheduler
scheduler = FairFitScheduler(logger, configuration)

Check failure on line 285 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Incompatible types in assignment (expression has type "FairFitScheduler", variable has type "FirstFitScheduler | None") [assignment]
elif configuration.sched_alg == 'MaxThroughput':
from mig.server.maxthroughputscheduler import MaxThroughputScheduler
scheduler = MaxThroughputScheduler(logger, configuration)

Check failure on line 288 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Incompatible types in assignment (expression has type "MaxThroughputScheduler", variable has type "FirstFitScheduler | None") [assignment]
elif configuration.sched_alg == 'Random':
from mig.server.randomscheduler import RandomScheduler
scheduler = RandomScheduler(logger, configuration)

Check failure on line 291 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Incompatible types in assignment (expression has type "RandomScheduler", variable has type "FirstFitScheduler | None") [assignment]
elif configuration.sched_alg == 'FIFO':
from mig.server.fifoscheduler import FIFOScheduler
scheduler = FIFOScheduler(logger, configuration)

Check failure on line 294 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Incompatible types in assignment (expression has type "FIFOScheduler", variable has type "FirstFitScheduler | None") [assignment]
else:
from mig.server.firstfitscheduler import FirstFitScheduler
print('Unknown sched_alg %s - using FirstFit scheduler'
% configuration.sched_alg)
scheduler = FirstFitScheduler(logger, configuration)

scheduler.attach_job_queue(job_queue)

Check failure on line 301 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Item "None" of "FirstFitScheduler | None" has no attribute "attach_job_queue" [union-attr]
scheduler.attach_done_queue(done_queue)

Check failure on line 302 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Item "None" of "FirstFitScheduler | None" has no attribute "attach_done_queue" [union-attr]
if schedule_cache:
scheduler.set_cache(schedule_cache)

Check failure on line 304 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Item "None" of "FirstFitScheduler | None" has no attribute "set_cache" [union-attr]

# redirect grid_stdin to sys.stdin

Expand Down Expand Up @@ -424,8 +424,8 @@

# Update list of users - create user if new

scheduler.update_users(user_dict)

Check failure on line 427 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Item "None" of "FirstFitScheduler | None" has no attribute "update_users" [union-attr]
user_dict = scheduler.find_user(user_dict)

Check failure on line 428 in mig/server/grid_script.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Item "None" of "FirstFitScheduler | None" has no attribute "find_user" [union-attr]
user_dict['QUEUE_HIST'].pop(0)
user_dict['QUEUE_HIST'].append(dict_userjob)
scheduler.update_seen(user_dict)
Expand Down Expand Up @@ -1594,3 +1594,4 @@
sys.stdout.flush()
loop_counter += 1
logger.debug('loop ended')

1 change: 1 addition & 0 deletions mig/server/grid_sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2135,3 +2135,4 @@ def start_service(configuration):
info_msg = "Leaving with no more workers active"
logger.info(info_msg)
print(info_msg)

1 change: 1 addition & 0 deletions mig/server/grid_webdavs-3.x.py
Original file line number Diff line number Diff line change
Expand Up @@ -2139,3 +2139,4 @@ def run(configuration):
except Exception as exc:
logger.error("exiting on unexpected exception: %s" % exc)
logger.info(traceback.format_exc())

Loading