waldur-mastermind icon indicating copy to clipboard operation
waldur-mastermind copied to clipboard

Autoprovisioning project is not accessible

Open rolnas opened this issue 1 year ago • 10 comments

In 7.3.0 when autoprovisioning the private project is not accessible, even if an user is project administrator. Page with message "You've either entered invalid URL or don't have enough permissions to view this page." is shown.

The same for organisation page.

rolnas avatar Feb 04 '25 08:02 rolnas

  1. Can you please check what permissions the user has in the user profile page?
  2. Can you please check what permissions are loaded for the user roles? You can see that from network tab, from /roles requests.

livenson avatar Feb 04 '25 08:02 livenson

Image

rolnas avatar Feb 04 '25 08:02 rolnas

  1. ok, the name of the created project looks a bit ugly, of course. should we change it somehow?
  2. can you please check the /roles thing?
  3. Can you please open network tab and navigate to the link that you mentioned is broken? What url requests will return 404?

livenson avatar Feb 04 '25 10:02 livenson

When I open this project link https://waldur.mif/projects/c0f3b97fbb254d3ebcfd9193e40b4915/ into another browser tab - the same error message. If I look for projects via django admin - there are no additional projects created. So looks like project was not saved into DB.

rolnas avatar Feb 04 '25 11:02 rolnas

No projects are shown in Projects tab for an user.

rolnas avatar Feb 04 '25 11:02 rolnas

So role is created for non existent project.

rolnas avatar Feb 04 '25 11:02 rolnas

ok, thanks, we'll investigate

livenson avatar Feb 04 '25 11:02 livenson

Just hypothesis - because this user were many times deleted/recreated, probably it finds internally a project created on first time and use it as object but it is marked as deleted in DB.

rolnas avatar Feb 04 '25 11:02 rolnas

I tested with another user and it works OK, so it should be related with previous (deleted) instance of an user. Some fantom user project still in DB, but reused for an user.

rolnas avatar Feb 04 '25 12:02 rolnas

projects = structure_models.Project.objects.filter(name='f:456e9c32-e691-42b1-9d67-04ff17f81ecf:rona1043') vars(projects[0]) {'_state': <django.db.models.base.ModelState object at 0x7f774e914210>, 'id': 3, 'created': datetime.datetime(2025, 2, 3, 11, 29, 41, 456950, tzinfo=datetime.timezone.utc), 'modified': datetime.datetime(2025, 2, 3, 11, 50, 30, 402834, tzinfo=datetime.timezone.utc), 'is_removed': True, 'image': <ImageFieldFile: None>, 'description': '', 'slug': 'f456e9c3-1', 'uuid': StringUUID('c0f3b97fbb254d3ebcfd9193e40b4915'), 'backend_id': '', 'oecd_fos_2007_code': None, 'name': 'f:456e9c32-e691-42b1-9d67-04ff17f81ecf:rona1043', 'start_date': None, 'end_date': None, 'end_date_requested_by_id': None, 'type_id': None, 'is_industry': False, 'customer_id': 2, '_tracker': <model_utils.tracker.FieldInstanceTracker object at 0x7f774e916550>, '_instance_initialized': True}

So it is really in removed state (is_removed=True).

rolnas avatar Feb 05 '25 09:02 rolnas

New module for auto-provisioning has been released.

livenson avatar Sep 04 '25 07:09 livenson