make sampledata can't find machine-resources

Bug #1915359 reported by Huw Wilkins
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Adam Collard

Bug Description

When running `make sampledata` using maas master it fails with:

$ make sampledata
ln -sf ../.ve/bin/maas-region bin/maas-region
ln -sf ../.ve/bin/postgresfixture bin/postgresfixture
bin/database --preserve run -- bin/maas-region dbupgrade
Operations to perform:
  Apply all migrations: auth, contenttypes, maasserver, metadataserver, piston3, sessions, sites
Running migrations:
  No migrations to apply.
bin/database --preserve run -- bin/maas-region generate_sample_data
Traceback (most recent call last):
  File "bin/maas-region", line 11, in <module>
    load_entry_point('maas', 'console_scripts', 'maas-region')()
  File "/home/ubuntu/maas/src/maasserver/", line 77, in run
    run_django(is_snap, is_devenv)
  File "/home/ubuntu/maas/src/maasserver/", line 66, in run_django
  File "/usr/lib/python3/dist-packages/django/core/management/", line 381, in execute_from_command_line
  File "/usr/lib/python3/dist-packages/django/core/management/", line 375, in execute
  File "/usr/lib/python3/dist-packages/django/core/management/", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3/dist-packages/django/core/management/", line 364, in execute
    output = self.handle(*args, **options)
  File "/home/ubuntu/maas/src/maasserver/management/commands/", line 25, in handle
  File "/home/ubuntu/maas/src/maasserver/testing/", line 179, in populate
  File "/home/ubuntu/maas/src/maasserver/utils/", line 737, in call_within_transaction
    return func_outside_txn(*args, **kwargs)
  File "/home/ubuntu/maas/src/maasserver/utils/", line 540, in retrier
    return func(*args, **kwargs)
  File "/usr/lib/python3.8/", line 75, in inner
    return func(*args, **kwds)
  File "/home/ubuntu/maas/src/maasserver/testing/", line 326, in populate_main
    mac_addresses = get_mac_addresses()
  File "/home/ubuntu/maas/src/provisioningserver/utils/", line 56, in get_mac_addresses
    ip_addr = get_ip_addr()
  File "/home/ubuntu/maas/src/provisioningserver/utils/", line 43, in get_ip_addr
    output = call_and_check([get_resources_bin_path()])
  File "/home/ubuntu/maas/src/provisioningserver/utils/", line 102, in call_and_check
    process = Popen(command, *args, stdout=PIPE, stderr=PIPE, **kwargs)
  File "/usr/lib/python3.8/", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/maas/machine-resources/amd64'
make: *** [Makefile:273: sampledata] Error 1

It looks like I have a `/home/ubuntu/maas/src/machine-resources/src/machine-resources/` dir, but nothing for `amd64`.

Related branches

Revision history for this message
Huw Wilkins (huwshimi) wrote :

I seem to have got things mostly working by doing:

cd src/machine-resources/
sudo make install

Then doing `make sampledata` finishes successfully.

However, doing `make all` now fails with:

rm: cannot remove 'src/machine-resources/vendor/': Permission denied
rm: cannot remove 'src/machine-resources/vendor/': Permission denied
rm: cannot remove 'src/machine-resources/vendor/': Permission denied
rm: cannot remove 'src/machine-resources/vendor/': Permission denied
rm: cannot remove 'src/machine-resources/vendor/': Permission denied
make[1]: *** [Makefile:34: vendor] Error 1
make[1]: Leaving directory '/home/ubuntu/maas/src/machine-resources'
make: *** [Makefile:155: machine-resources-vendor] Error 2

Huw Wilkins (huwshimi)
tags: added: ui
tags: removed: ui
Changed in maas:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Adam Collard (adam-collard)
Changed in maas:
milestone: none → 2.10-beta1
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers