Commit Graph

6567 Commits

Author SHA1 Message Date
Vitalii
fc074b693b web/satellite: fix demo-bucket creation issue
Store demo-bucket creation status in browser local store so that it's not created every time when user enters buckets screen.
It will start working after first usage in new browser.
So if user removes bucket in Chrome and opens Buckets screen in Firefox demo-bucket will be created but only once.

Change-Id: I9f5811d97ab6208c5f757ededcd7c36cd864795c
2022-04-12 07:42:43 +00:00
Erik van Velzen
16480c97da satellite/metabase: deduplicate delete query
Use the same query when deleting a single object or multiple.
I have chosen not to deduplicate the row "scan" logic because
it is less complicated code and this change would expand to other
parts of the codebase.

Part of https://github.com/storj/storj/issues/4700

Change-Id: I7a958c78c903b2bddd72ca217971f7e8e02a0d0c
2022-04-11 14:12:18 +00:00
Kaloyan Raev
de6852510f private/testplanet: configurable timeout
Testplanet limits the execution of a single test case to 3 minutes.

This change adds a Timeout field to the Testplanet's config, so test
cases can configure their timeout. This is helpful when executing larger
3rd party test suite on top of Testplanet.

Change-Id: Ibbf7c5ffdc0a9e723e7e28b885eac084f04c6ca1
2022-04-11 13:19:08 +00:00
Michał Niewrzał
99ec4c8869 satellite/gc: improve test for copies
Initial space used for pieces is calcualted, not retrieved
from storage nodes and at the end of test we are deleting
also copies that become ancestors to verify that all data
was removed from storage nodes.

Change-Id: I9804adb9fa488dc0094a67a6e258c144977e7f5d
2022-04-11 11:06:01 +00:00
Michał Niewrzał
a3d90167c7 mod: bump to latest uplink
Change-Id: I790be139cdb4c52395507c01d4c4d36eab6a5915
2022-04-11 08:52:03 +00:00
Cameron
d4ad3a3ca6 satellite/satellitedb/attribution: update value attribution query to return byte-hours
Before, the VA query was summing the total and dividing by the number of
rows. This gives the average bytes stored per hour, but we charge for
usage with byte-hours. Why not do value attribution the same way?
To do that, we don't divide by the number of rows. We also have object
and segment fees so return segment-hours and object-hours too.

Change-Id: I1f18b7e1b2bae1d3fae1ca3b93bfc24db5b9b0e6
2022-04-08 16:22:21 -04:00
Michał Niewrzał
c105562479 satellite/gc: test GC with object copies
We implemented server-side copy feature and we would like to
confirm that it is not affecting GC.

Fixes https://github.com/storj/storj/issues/4696

Change-Id: Id391f0badf5fce51f9910f0df732d477b07fa7ac
2022-04-07 11:32:35 +00:00
Egon Elbre
e10eabe30b web/storagenode: update dependencies
Also pin all web/multinode dependencies, which was missing from
the other change.

Change-Id: Id78749076af6d80e59949efd73c1e10f5b52589c
2022-04-07 07:50:22 +00:00
Fadila Khadar
3d9329a5b1 satellite/metabase: overwrite existing destination on copy
s3 allows for overwriting an object when using server-side copy.
This change makes overwriting the destination part of the atomic server-side copy operation so that
if copy fails, the old object is still available.

All the segments of the existing destination are deleted. If this destination object is an ancestor of another object, a new ancestor is promoted.

Fixes https://github.com/storj/storj/issues/4607

Change-Id: I85d1250850bb71867586ac230c8275a0cc1b63c3
2022-04-07 06:28:51 +00:00
Moby von Briesen
3397886b14 docs/blueprints: Add session management blueprint
New blueprint describes a design which provides the satellite greater
control over sessions authorized to use the web app.

Change-Id: I5af227aef6d6b096167e2e8a60f1e8214c2cd71f
2022-04-06 21:10:33 +00:00
Vitalii
3b39399905 apigen: endpoint to create new Project
Implemented new endpoint for project creation using apigen.
Implemented new service method compatible with new generated api.

Change-Id: I2bae22c8b046f21ec5bb6522f09b9c4e74bdba0c
2022-04-06 17:49:46 +00:00
Egon Elbre
9d3c886f35 web/multinode: update dependencies
Change-Id: If575d8d9b481476203cc08c80d95d49273d45c29
2022-04-06 14:48:21 +00:00
Clement Sam
e486585853 Dockerfiles: switch base image from alpine to Debian
We've had a lot of issues with alpine and currently there's a broken
network issue on alpine for users running on RPI arm32 architechture
which requires a workaround before docker is able to sync time between
the host and the container: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0\#time64_requirements.

Since we're switching the base image of the storagenode to debian,
it's best to switch the base image of all our docker images to
debian as well for consistency; less drift across them and keeps
the push target consistent.

Change-Id: If3adf7a57dc59f19ef2221b892f340d919798fc5
2022-04-05 11:40:44 +00:00
Clement Sam
ee7f0d3a2a Makefile: fix wrong indentation
Indentations are off in the push-storagenode-images target in the makefile which is possibly causing build to fail

Change-Id: Ia25b8f700f49c551e3f201c988747a83e04ad83c
2022-04-05 09:11:55 +00:00
Erik van Velzen
61a47f3e95 cmd/uplink: refactor date parsing
Change-Id: I6a5cbdf86eecdc5578f3dae7a8ab1b0d4485e1da
2022-04-05 01:03:20 +00:00
Erik van Velzen
54c3bafb5b satellite/metabase: delete bucket with cross-bucket copies
When deleting a bucket, make sure that object copies in other buckets are
promoted to new ancestor and left in a working state.

Closes https://github.com/storj/storj/issues/4591

Change-Id: I019d916cd6de5ed51dd0dd25f47c35d0ec666af6
2022-04-05 01:32:02 +02:00
Mya
08b87218bf developing: add development guide for new comers
This change introduces a DEVELOPING.md file, commonly seen across
open source repositories as a way to communicate how to get started
contributing code to new-comers.

Change-Id: Idb92231e025250a4c6d2fc789cab5f78ca87086a
2022-04-04 17:33:48 +00:00
paul cannon
985ccbe721 satellite/repair: in dns redial, don't retry if CloseError
To save load on DNS servers, the repair code first tries to dial the
last known good ip and port for a node, and then falls back to a DNS
lookup only if we fail to connect to the last known good ip and port.

However, it looks like we are seeing errors during the client stream
Close() call (probably due to quic-go code), and those are classified
the same as errors encountered during Dial. The repairer code sees this
error, assumes that we failed to contact the node, and retries- but
since we did actually succeed in connecting the first time around, this
results in submitting the same order limit (with the same serial number)
to the storage node, which (rightfully) rejects it.

So together with change I055c186d5fd4e79560f67763175bc3130b9bc7d2 in
storj/uplink, this should avoid the double submission and avoid dinging
nodes' suspension scores unfairly.

See https://github.com/storj/storj/issues/4687.

Also, moving the testsuite directory check up above check-monkit in the
Jenkins Lint task, so that a non-tidy testsuite/go.mod can be recognized
and handled before everything breaks weirdly and seemingly randomly
later on.

Change-Id: Icb2b05aaff921d0af6aba10e450ac7e0a7bb2655
2022-04-04 17:01:09 +00:00
Monty Anderson
348007e119 web/satellite browser: don't use iterable as an array
Fixes a problem with using Upload button to upload files.

Change-Id: I765894535372d1840e7cab7c3a71d5b69d8f17f3
2022-04-04 15:07:54 +00:00
Vitalii
9b695525c6 satellite/console: fixed small email validation issues
Moved invalid email testing to separate test.
Made all the emails used to have .test domain.
Added links to regex resources.

Change-Id: I26920ba7360064528256a6aeaea947bbe56ef618
2022-04-04 09:43:33 +00:00
Michał Niewrzał
e93bbf693d satellite/metainfo: add missing method monitoring
Change-Id: I3a0d8121203a6f543f660de02628967cf7f22040
2022-04-03 15:47:14 +00:00
Vitalii
67b5b07730 apigen: api key authentication implemented
Implemented account management api key authentication.
Extended IsAuthenticated service method to include both cookie and api key authorization.

Change-Id: I6f2d01fdc6115cb860f2e49c74980a39155afe7e
2022-04-01 15:17:38 +00:00
Michał Niewrzał
8cdadae124 satellite/metainfo: optimize geo config check for move/copy
This change has two purposes. First is to avoid DB call in case
source and destination bucket are the same.
Second is to return bucket not found error in correct order. If
source and destination bucket are different we will first check
source and later destination. Currently we will get first error
about not existing destination bucket.
Because of this change we stop putting bucket placement
into satellite stream id but its not needed as we don't use
this value with finish move/copy object methods.

Change-Id: I0f7b3ba604d53c722e8fa4d7a37843a69d02bebd
2022-04-01 11:49:44 +00:00
Michał Niewrzał
2014e4655a satellite/metabase: bring back copy/move validation for key and nonce
Uplink is fixed and now we should always get both key and nonce
or both empty.

Fixes https://github.com/storj/storj/issues/4646

Change-Id: I65dca2d4d5a10787c2fecad39e301121f1ae242a
2022-04-01 07:23:22 +00:00
Cameron
2b39df460c cmd/nullify-bad-user-agents: set user_agent to NULL where user_agent = partner_id
In the migration to migrate the corresponding name of the partner id to
user agent, part of the requirement was to migrate the partner id
itself if there was no partner name associated. This turned out to not
be so good. When we parse the user_agent column later, it is returning an
error if the user agent is one of these UUIDs.

Change-Id: I776ea458b82e1f99345005e5ba73d92264297bec
2022-03-31 16:57:50 -04:00
Michał Niewrzał
25e92fe443 satellite/metabase: deletion query as explicit transaction
Latest CRDB version did't work with our server-side copy deletion
query and we had to rewrite it.

Fixes https://github.com/storj/storj/issues/4655

Change-Id: I66d5c4abfc3c3f53dea8bc01ae11cd2b020e4289
2022-03-31 11:40:36 +00:00
Egon Elbre
7aa001d62f private/version: document kebabToPascal
Change-Id: Id7bdf969072c330956c093c24b662f4330fc4d4c
2022-03-31 13:52:27 +03:00
Egon Elbre
5fca07387f storagenode/storagenodedb: make schemagen gofmt compatible
Few adjustments to the output to make it consistent with gofmt.

Change-Id: Icb673a0632c3be4cb0f4ab1c4aeffc0290e38e95
2022-03-31 13:28:10 +03:00
Egon Elbre
d9b14f7902 private/version: replace custom stringsTitle
cases package has an option cases.NoLower for the behavior we need.

Change-Id: Ie5bd4c52384fff45228321e02ab2478b5fecf245
2022-03-31 13:28:10 +03:00
Qweder93
2a7b20e8e4 cmd/uplink: integrate server-side copy with uplink cp command
Resolves https://github.com/storj/storj/issues/4486

Change-Id: I42ac2ad2e1a05df4a83606f1990b639f08791403
2022-03-31 09:25:29 +00:00
Egon Elbre
e5972d8920 all: fix linting errors
strings.Title is deprecated in Go 1.18, replace it with
golang.org/x/text/cases.

Change-Id: I6185b97d37309dbe4a6715f794383ab259a0658b
2022-03-30 18:45:23 +03:00
Egon Elbre
a2fe69767d satellite/admin: delete unused file
Change-Id: Ie646fbfd9f0e8bb958314a232e8995474de25039
2022-03-30 10:56:26 +00:00
Michał Niewrzał
18ab60dc92 satellite/metabase: drop GetSegmentByOffset
Methods was never used in production and it's not sure that
it will be used at all. Let's drop it and restore if will be needed.

Fixes https://github.com/storj/storj/issues/4480

Change-Id: Ifd780d0096b67be7e72dff84bdcf1d957e0b48b5
2022-03-30 09:03:48 +00:00
paul cannon
d8733ddd40 satellite/satellitedb: stop using _gob columns
This sets the corresponding _numeric columns to be NOT NULL (it has been
verified manually that there are no more NULL _numeric values on any
known satellites, and it should be impossible with current code to get
new NULL values in the _numeric columns.

We can't drop the _gob columns immediately, as there will still be code
running that expects them, but once this version is deployed we can
finally drop them and be totally done with this crazy 5-step migration.

Change-Id: I518302528d972090d56b3eedc815656610ac8e73
2022-03-30 04:13:13 +00:00
Moby von Briesen
0018d62837 satellite/analytics: Associate Hubspot token with new user
If a visitor has accepted cookies on www.storj.io, there might be a
"hubspotutk" cookie in their browser upon account creation. This allows
Hubspot to link website activity with a newly created user.

Change-Id: If06c67fb4d2e5dd3cf46c1fe80a0e9d7f25d6e58
2022-03-29 16:25:33 -04:00
prerna-parashar
9ef11644fd
satellite/analytics: Added "email" in segment track calls
Added "email" property in segment track calls so that we are able to send user behavioral events to HubSpot through segment.io
2022-03-29 13:05:56 -07:00
nadimhq
952f50e6e3
docs/testplan: Adding a testplan for Server Side Copy (#4317)
testplan: Adding a testplan for Server Side Copy

This is a testplan for Server Side Copy that follows the testplan template.
2022-03-29 10:38:59 -04:00
Clement Sam
d611c16891 cmd/storagenode: update storganode-base image version in Dockerfile
Change-Id: I2e40f75d7cf1f673ea16a633a427225f97ea92ed
2022-03-29 13:26:33 +00:00
Monty Anderson
20a42f6cd0 web/satellite: remove reference to non-existent default image
Change-Id: I7b32f71daf1bf9256d86d1f29b48ad8cc109af84
2022-03-29 12:52:06 +00:00
Monty Anderson
2c83503712 web/satellite: type + lint files store
This change makes the files store fully type-safe. It builds with `npm run build` and lints with `npm run lint`, displaying no errors or warnings.

There was an issue where I was unable to use the newer web APIs for filesystem operations, I think TypesScript (and Vue?) may need to be updated - I already tried updating `@types/web`. To mitigate this, I added slim type definitions for only the parts we use. The definitions are exactly as they appear on MDN and even include links to the relevant documentation. In future they can be removed with no compatibility issues.

Change-Id: I7b8b4a5f95caabdb546157c65e9f2f42c5132a6f
2022-03-29 12:23:16 +00:00
Cameron
6294334de6 satellite/admin: add account management api keys to admin
Add endpoints to satellite admin for account management api key creation
and revocation.

Change-Id: I2390f379f12b0958e68ddd63439d75dae129be19
2022-03-29 11:52:45 +00:00
Egon Elbre
566fc8ee25 satellite/repair: test inmemory/disk difference only once
We don't need to have every single test for both, only one for
each should be sufficient. For all other tests it doesn't matter
which one we use.

Change-Id: I9962206a4ee025d367332c29ea3e6bc9f0f9a1de
2022-03-29 14:08:13 +03:00
Egon Elbre
1f1f777d06 satellite/admin/ui,web/{multinode,storagenode}: build without embedding
Embedded files significantly increase the binary size for linking.
Add a tag that allows disabling embedding the build npm code.

Change-Id: I9d1fd7376d1fa035965c33d259faaa6c4770dfe1
2022-03-29 13:18:04 +03:00
Egon Elbre
19a2555126 private/testplanet: try using multiple localhosts
Rather than starting all servers on 127.0.0.1 start them
on a random local host to try avoid port exhaustion.
The port exhaustion is just a guess.

Change-Id: Ibf31d6a017852238d836291d703642b44ff66c0c
2022-03-29 05:24:35 +00:00
Sean Harvey
53de525721 mod: bump storj/common, storj/private, and storj/uplink deps
Change-Id: Iac8528ba793e6bba04d8e47a1254fcef665cd342
2022-03-28 22:06:16 +00:00
Michał Niewrzał
4da3dc8170 satellite/metabase: improve processing of key/nonce while finish copy/move
So far we assumes that metadata key/nonce cannot be empty at all
but at some point we adjusted code to accept empty metadata/key/nonce
to save DB space.

This change is adjusting how we are processing nonce while
FinishMoveObject/FinishCopyObject. We can use storj.Nonce directly
which makes code cleaner. It's also fixing issue in FinishMoveObject
where we didn't convert nonce correctly to []byte.

Part of change is disabling validation for key and nonce until
uplink will be adjusted. We need change uplink to send always
both key and nonce or non of them. Validation will be restored
as soon as change for uplink will be merged.

https://github.com/storj/storj/issues/4646

Change-Id: Ia1772bc430ae591f54c6a9ae0308a4968aa30bed
2022-03-28 14:34:21 +00:00
Egon Elbre
4a6c2e2a9c satellite/admin/ui: avoid needing an additional copy
This also fixes the build order. Unfortunately we need
to ensure that the web frontends are built before installing
Go binaries.

Fixes https://github.com/storj/storj/issues/4654

Change-Id: I5d1c83125fd3d1a454d3400b2cbdd44bd3f2250c
2022-03-25 11:42:22 +02:00
Clement Sam
c641f4c9ac cmd/storagenode: use Debian as base image instead of alpine
We are switching from alpine to debian due to a network issue
introduced in alpine 3.13+ which fails to verify certificates
due to not all armhf boards meet the time64 requirement:
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0\#time64_requirements

Also, Debian does not have official imagess for arm32v6 architecture
so we are building with arm32v5 arch in the Makefile.

Change-Id: I3660c3f64b7c2b342dd4ccb876af5f4e3036ea9d
2022-03-25 08:19:20 +00:00
prerna-parashar
048d3b497d
Modified event names (#4658) 2022-03-24 09:59:28 -07:00
Erik van Velzen
5189dfdca2 satellite/metabase/metabasetest: add EquateEmpty
Remove normalize function in favor of EquateEmpty for nil comparisons.

Change-Id: I322470d21dc2a2a51cce82d4054dad7d07a47eb1
2022-03-24 11:57:10 +01:00