Skip to content

In case all IDs are reserved recommend 0#768

Merged
rdmark merged 23 commits intoPiSCSI:developfrom
philenotfound:master
Jul 1, 2022
Merged

In case all IDs are reserved recommend 0#768
rdmark merged 23 commits intoPiSCSI:developfrom
philenotfound:master

Conversation

@philenotfound
Copy link
Copy Markdown
Contributor

Otherwise the occupied list is empty and this exception brings down the
whole web interface.

This can be easily provoked by just reserving all IDs in the web interface.

Tony and others added 23 commits January 19, 2021 10:48
…ce the correct gender of parts. Should be no functional change
…ce the correct gender of parts. Should be no functional change
* Update README.md

Added reference to gitflow

* Updated to match new versioning structure (PiSCSI#73)

* Updated to match new versioning structure

* fix version number

Co-authored-by: Tony Kuker <akuker@gmail.com>

* Scsimon improvements (PiSCSI#74)

* Updated scsimon to save data on a nano-second time scale, instead of micro-second

* Cleanup error messages and data types

Co-authored-by: Tony Kuker <akuker@gmail.com>

* Updated for new version number

* Change reported version back to development build

Co-authored-by: Tony Kuker <akuker@gmail.com>
Merge 21.05.1 changes to master
* First attempt at adding 2.5 inch drive connector

* Clean up silkscreen and fix DRC issues

* additional cleanup. Made Pin 1 of the PB connector square

* minor tweaks

* Updates for ordered version

* Generate step file and schematic pdf

* First draft of powerbook drive bracket

* Added side holes and hole for MIPI connector

* Additional updates to the powerbook 3d printed bracket

* Moved RaSCSI board 1mm in + lots of cleanup

* Added optional floppy power connector. As-ordered version 2.4a

* Added optional floppy power connector. As-ordered version 2.4a

Co-authored-by: Tony <akuker@gmail.com>
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.2 to 8.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](python-pillow/Pillow@8.1.2...8.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
added link to compatibility list.
October 2021 Release
RaSCSI version 21.11.1
RaSCSI version 21.12.01
RaSCSI version 22.02.01
RaSCSI version 22.05.02
Otherwise the occupied list is empty and this exception brings down the
whole web interface.

This can be easily provoked by just reserving all IDs in the web interface.
@rdmark
Copy link
Copy Markdown
Member

rdmark commented Jul 1, 2022

@philenotfound Thanks for taking the time to submit a patch! Now, are you sure you tested this against the master branch code? I can honestly not reproduce the reported issue.

Copy link
Copy Markdown
Member

@rdmark rdmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot reproduce issue that this code supposedly fixes.

@philenotfound
Copy link
Copy Markdown
Contributor Author

Reproduced with 348b5dd.

  1. Detach All Devices.
  2. Click Reserve on every device. Reserving the last one will crash the web app.
Jul 01 06:24:56 rascsi RASCSIWEB[977]: [2022-07-01 06:24:56,262] ERROR in app: Exception on / [GET]
Jul 01 06:24:56 rascsi RASCSIWEB[977]: Traceback (most recent call last):
Jul 01 06:24:56 rascsi RASCSIWEB[977]:   File "/home/pi/RASCSI/python/web/venv/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
Jul 01 06:24:56 rascsi RASCSIWEB[977]:     response = self.full_dispatch_request()
Jul 01 06:24:56 rascsi RASCSIWEB[977]:   File "/home/pi/RASCSI/python/web/venv/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
Jul 01 06:24:56 rascsi RASCSIWEB[977]:     rv = self.handle_user_exception(e)
Jul 01 06:24:56 rascsi RASCSIWEB[977]:   File "/home/pi/RASCSI/python/web/venv/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
Jul 01 06:24:56 rascsi RASCSIWEB[977]:     rv = self.dispatch_request()
Jul 01 06:24:56 rascsi RASCSIWEB[977]:   File "/home/pi/RASCSI/python/web/venv/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
Jul 01 06:24:56 rascsi RASCSIWEB[977]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Jul 01 06:24:56 rascsi RASCSIWEB[977]:   File "/home/pi/RASCSI/python/web/src/web.py", line 132, in index
Jul 01 06:24:56 rascsi RASCSIWEB[977]:     scsi_ids, recommended_id = get_valid_scsi_ids(devices["device_list"], reserved_scsi_ids)
Jul 01 06:24:56 rascsi RASCSIWEB[977]:   File "/home/pi/RASCSI/python/web/src/web_utils.py", line 35, in get_valid_scsi_ids
Jul 01 06:24:56 rascsi RASCSIWEB[977]:     recommended_id = occupied_ids.pop(0)
Jul 01 06:24:56 rascsi RASCSIWEB[977]: IndexError: pop from empty list

To recover you have to restart rascsi-web.service

@rdmark
Copy link
Copy Markdown
Member

rdmark commented Jul 1, 2022

Now I get it, thanks. Somehow I read it as attaching to all ids. It is quite the corner case. Good catch!

@rdmark
Copy link
Copy Markdown
Member

rdmark commented Jul 1, 2022

One request for future contributions: Please prepare PRs against the develop branch. We never work directly in the master branch.

@rdmark rdmark changed the base branch from master to develop July 1, 2022 05:49
@rdmark rdmark merged commit 94c98b4 into PiSCSI:develop Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants